var rg=t=>{throw TypeError(t)};var zc=(t,e,r)=>e.has(t)||rg("Cannot "+r);var A=(t,e,r)=>(zc(t,e,"read from private field"),r?r.call(t):e.get(t)),ue=(t,e,r)=>e.has(t)?rg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),X=(t,e,r,i)=>(zc(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),ke=(t,e,r)=>(zc(t,e,"access private method"),r);var Ya=(t,e,r,i)=>({set _(a){X(t,e,a,r)},get _(){return A(t,e,i)}});function J1(t,e){for(var r=0;ri[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=r(a);fetch(a.href,u)}})();function Gv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $c={exports:{}},Yi={},Hc={exports:{}},be={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var sg;function Z1(){if(sg)return be;sg=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function w(_){return _===null||typeof _!="object"?null:(_=v&&_[v]||_["@@iterator"],typeof _=="function"?_:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,k={};function S(_,z,ye){this.props=_,this.context=z,this.refs=k,this.updater=ye||E}S.prototype.isReactComponent={},S.prototype.setState=function(_,z){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,z,"setState")},S.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function R(){}R.prototype=S.prototype;function V(_,z,ye){this.props=_,this.context=z,this.refs=k,this.updater=ye||E}var I=V.prototype=new R;I.constructor=V,b(I,S.prototype),I.isPureReactComponent=!0;var O=Array.isArray,B=Object.prototype.hasOwnProperty,K={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function L(_,z,ye){var ve,le={},he=null,Ne=null;if(z!=null)for(ve in z.ref!==void 0&&(Ne=z.ref),z.key!==void 0&&(he=""+z.key),z)B.call(z,ve)&&!G.hasOwnProperty(ve)&&(le[ve]=z[ve]);var Ae=arguments.length-2;if(Ae===1)le.children=ye;else if(1>>1,z=q[_];if(0>>1;_a(le,U))hea(Ne,le)?(q[_]=Ne,q[he]=U,_=he):(q[_]=le,q[ve]=U,_=ve);else if(hea(Ne,U))q[_]=Ne,q[he]=U,_=he;else break e}}return se}function a(q,se){var U=q.sortIndex-se.sortIndex;return U!==0?U:q.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();t.unstable_now=function(){return c.now()-f}}var h=[],m=[],g=1,v=null,w=3,E=!1,b=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(q){for(var se=r(m);se!==null;){if(se.callback===null)i(m);else if(se.startTime<=q)i(m),se.sortIndex=se.expirationTime,e(h,se);else break;se=r(m)}}function O(q){if(k=!1,I(q),!b)if(r(h)!==null)b=!0,we(B);else{var se=r(m);se!==null&&fe(O,se.startTime-q)}}function B(q,se){b=!1,k&&(k=!1,R(L),L=-1),E=!0;var U=w;try{for(I(se),v=r(h);v!==null&&(!(v.expirationTime>se)||q&&!me());){var _=v.callback;if(typeof _=="function"){v.callback=null,w=v.priorityLevel;var z=_(v.expirationTime<=se);se=t.unstable_now(),typeof z=="function"?v.callback=z:v===r(h)&&i(h),I(se)}else i(h);v=r(h)}if(v!==null)var ye=!0;else{var ve=r(m);ve!==null&&fe(O,ve.startTime-se),ye=!1}return ye}finally{v=null,w=U,E=!1}}var K=!1,G=null,L=-1,J=5,de=-1;function me(){return!(t.unstable_now()-deq||125_?(q.sortIndex=U,e(m,q),r(h)===null&&q===r(m)&&(k?(R(L),L=-1):k=!0,fe(O,U-_))):(q.sortIndex=z,e(h,q),b||E||(b=!0,we(B))),q},t.unstable_shouldYield=me,t.unstable_wrapCallback=function(q){var se=w;return function(){var U=w;w=se;try{return q.apply(this,arguments)}finally{w=U}}}})(Kc)),Kc}var ug;function ib(){return ug||(ug=1,qc.exports=sb()),qc.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var cg;function ob(){if(cg)return _t;cg=1;var t=ff(),e=ib();function r(n){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+n,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function w(n){return h.call(v,n)?!0:h.call(g,n)?!1:m.test(n)?v[n]=!0:(g[n]=!0,!1)}function E(n,s,o,l){if(o!==null&&o.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function b(n,s,o,l){if(s===null||typeof s>"u"||E(n,s,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(n,s,o,l,d,p,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=o,this.propertyName=n,this.type=s,this.sanitizeURL=p,this.removeEmptyString=x}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){S[n]=new k(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var s=n[0];S[s]=new k(s,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){S[n]=new k(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){S[n]=new k(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){S[n]=new k(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){S[n]=new k(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){S[n]=new k(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){S[n]=new k(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){S[n]=new k(n,5,!1,n.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function V(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var s=n.replace(R,V);S[s]=new k(s,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var s=n.replace(R,V);S[s]=new k(s,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var s=n.replace(R,V);S[s]=new k(s,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){S[n]=new k(n,1,!1,n.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){S[n]=new k(n,1,!1,n.toLowerCase(),null,!0,!0)});function I(n,s,o,l){var d=S.hasOwnProperty(s)?S[s]:null;(d!==null?d.type!==0:l||!(2T||d[x]!==p[T]){var C=` `+d[x].replace(" at new "," at ");return n.displayName&&C.includes("")&&(C=C.replace("",n.displayName)),C}while(1<=x&&0<=T);break}}}finally{ye=!1,Error.prepareStackTrace=o}return(n=n?n.displayName||n.name:"")?z(n):""}function le(n){switch(n.tag){case 5:return z(n.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return n=ve(n.type,!1),n;case 11:return n=ve(n.type.render,!1),n;case 1:return n=ve(n.type,!0),n;default:return""}}function he(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case G:return"Fragment";case K:return"Portal";case J:return"Profiler";case L:return"StrictMode";case Ie:return"Suspense";case _e:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case me:return(n.displayName||"Context")+".Consumer";case de:return(n._context.displayName||"Context")+".Provider";case Re:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case De:return s=n.displayName||null,s!==null?s:he(n.type)||"Memo";case we:s=n._payload,n=n._init;try{return he(n(s))}catch{}}return null}function Ne(n){var s=n.type;switch(n.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=s.render,n=n.displayName||n.name||"",s.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(s);case 8:return s===L?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ae(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function xe(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ft(n){var s=xe(n)?"checked":"value",o=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),l=""+n[s];if(!n.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,p=o.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return d.call(this)},set:function(x){l=""+x,p.call(this,x)}}),Object.defineProperty(n,s,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function Tn(n){n._valueTracker||(n._valueTracker=ft(n))}function Nr(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var o=s.getValue(),l="";return n&&(l=xe(n)?n.checked?"true":"false":n.value),n=l,n!==o?(s.setValue(n),!0):!1}function zn(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function $n(n,s){var o=s.checked;return U({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??n._wrapperState.initialChecked})}function ch(n,s){var o=s.defaultValue==null?"":s.defaultValue,l=s.checked!=null?s.checked:s.defaultChecked;o=Ae(s.value!=null?s.value:o),n._wrapperState={initialChecked:l,initialValue:o,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function dh(n,s){s=s.checked,s!=null&&I(n,"checked",s,!1)}function Yl(n,s){dh(n,s);var o=Ae(s.value),l=s.type;if(o!=null)l==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+o):n.value!==""+o&&(n.value=""+o);else if(l==="submit"||l==="reset"){n.removeAttribute("value");return}s.hasOwnProperty("value")?Xl(n,s.type,o):s.hasOwnProperty("defaultValue")&&Xl(n,s.type,Ae(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(n.defaultChecked=!!s.defaultChecked)}function fh(n,s,o){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var l=s.type;if(!(l!=="submit"&&l!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+n._wrapperState.initialValue,o||s===n.value||(n.value=s),n.defaultValue=s}o=n.name,o!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,o!==""&&(n.name=o)}function Xl(n,s,o){(s!=="number"||zn(n.ownerDocument)!==n)&&(o==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+o&&(n.defaultValue=""+o))}var di=Array.isArray;function hs(n,s,o,l){if(n=n.options,s){s={};for(var d=0;d"+s.valueOf().toString()+"",s=zo.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;s.firstChild;)n.appendChild(s.firstChild)}});function fi(n,s){if(s){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=s;return}}n.textContent=s}var hi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nS=["Webkit","ms","Moz","O"];Object.keys(hi).forEach(function(n){nS.forEach(function(s){s=s+n.charAt(0).toUpperCase()+n.substring(1),hi[s]=hi[n]})});function vh(n,s,o){return s==null||typeof s=="boolean"||s===""?"":o||typeof s!="number"||s===0||hi.hasOwnProperty(n)&&hi[n]?(""+s).trim():s+"px"}function xh(n,s){n=n.style;for(var o in s)if(s.hasOwnProperty(o)){var l=o.indexOf("--")===0,d=vh(o,s[o],l);o==="float"&&(o="cssFloat"),l?n.setProperty(o,d):n[o]=d}}var rS=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function eu(n,s){if(s){if(rS[n]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function tu(n,s){if(n.indexOf("-")===-1)return typeof s.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nu=null;function ru(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var su=null,ps=null,ms=null;function wh(n){if(n=Li(n)){if(typeof su!="function")throw Error(r(280));var s=n.stateNode;s&&(s=da(s),su(n.stateNode,n.type,s))}}function Sh(n){ps?ms?ms.push(n):ms=[n]:ps=n}function bh(){if(ps){var n=ps,s=ms;if(ms=ps=null,wh(n),s)for(n=0;n>>=0,n===0?32:31-(pS(n)/mS|0)|0}var Ko=64,Qo=4194304;function yi(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Go(n,s){var o=n.pendingLanes;if(o===0)return 0;var l=0,d=n.suspendedLanes,p=n.pingedLanes,x=o&268435455;if(x!==0){var T=x&~d;T!==0?l=yi(T):(p&=x,p!==0&&(l=yi(p)))}else x=o&~d,x!==0?l=yi(x):p!==0&&(l=yi(p));if(l===0)return 0;if(s!==0&&s!==l&&(s&d)===0&&(d=l&-l,p=s&-s,d>=p||d===16&&(p&4194240)!==0))return s;if((l&4)!==0&&(l|=o&16),s=n.entangledLanes,s!==0)for(n=n.entanglements,s&=l;0o;o++)s.push(n);return s}function vi(n,s,o){n.pendingLanes|=s,s!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,s=31-en(s),n[s]=o}function xS(n,s){var o=n.pendingLanes&~s;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=s,n.mutableReadLanes&=s,n.entangledLanes&=s,s=n.entanglements;var l=n.eventTimes;for(n=n.expirationTimes;0=Ci),Yh=" ",Xh=!1;function Jh(n,s){switch(n){case"keyup":return KS.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var vs=!1;function GS(n,s){switch(n){case"compositionend":return Zh(s);case"keypress":return s.which!==32?null:(Xh=!0,Yh);case"textInput":return n=s.data,n===Yh&&Xh?null:n;default:return null}}function YS(n,s){if(vs)return n==="compositionend"||!bu&&Jh(n,s)?(n=Hh(),ea=gu=Qn=null,vs=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:o,offset:s-n};n=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=op(o)}}function lp(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?lp(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function up(){for(var n=window,s=zn();s instanceof n.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)n=s.contentWindow;else break;s=zn(n.document)}return s}function Tu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}function i1(n){var s=up(),o=n.focusedElem,l=n.selectionRange;if(s!==o&&o&&o.ownerDocument&&lp(o.ownerDocument.documentElement,o)){if(l!==null&&Tu(o)){if(s=l.start,n=l.end,n===void 0&&(n=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(n,o.value.length);else if(n=(s=o.ownerDocument||document)&&s.defaultView||window,n.getSelection){n=n.getSelection();var d=o.textContent.length,p=Math.min(l.start,d);l=l.end===void 0?p:Math.min(l.end,d),!n.extend&&p>l&&(d=l,l=p,p=d),d=ap(o,p);var x=ap(o,l);d&&x&&(n.rangeCount!==1||n.anchorNode!==d.node||n.anchorOffset!==d.offset||n.focusNode!==x.node||n.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(d.node,d.offset),n.removeAllRanges(),p>l?(n.addRange(s),n.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),n.addRange(s)))}}for(s=[],n=o;n=n.parentNode;)n.nodeType===1&&s.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,xs=null,Cu=null,_i=null,Au=!1;function cp(n,s,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Au||xs==null||xs!==zn(l)||(l=xs,"selectionStart"in l&&Tu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),_i&&Ri(_i,l)||(_i=l,l=la(Cu,"onSelect"),0Es||(n.current=Vu[Es],Vu[Es]=null,Es--)}function Me(n,s){Es++,Vu[Es]=n.current,n.current=s}var Jn={},ht=Xn(Jn),Tt=Xn(!1),Ir=Jn;function Ts(n,s){var o=n.type.contextTypes;if(!o)return Jn;var l=n.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===s)return l.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in o)d[p]=s[p];return l&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=s,n.__reactInternalMemoizedMaskedChildContext=d),d}function Ct(n){return n=n.childContextTypes,n!=null}function fa(){Ve(Tt),Ve(ht)}function Tp(n,s,o){if(ht.current!==Jn)throw Error(r(168));Me(ht,s),Me(Tt,o)}function Cp(n,s,o){var l=n.stateNode;if(s=s.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var d in l)if(!(d in s))throw Error(r(108,Ne(n)||"Unknown",d));return U({},o,l)}function ha(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Jn,Ir=ht.current,Me(ht,n),Me(Tt,Tt.current),!0}function Ap(n,s,o){var l=n.stateNode;if(!l)throw Error(r(169));o?(n=Cp(n,s,Ir),l.__reactInternalMemoizedMergedChildContext=n,Ve(Tt),Ve(ht),Me(ht,n)):Ve(Tt),Me(Tt,o)}var An=null,pa=!1,Bu=!1;function Pp(n){An===null?An=[n]:An.push(n)}function y1(n){pa=!0,Pp(n)}function Zn(){if(!Bu&&An!==null){Bu=!0;var n=0,s=Oe;try{var o=An;for(Oe=1;n>=x,d-=x,Pn=1<<32-en(s)+d|o<ge?(it=ae,ae=null):it=ae.sibling;var Pe=$(N,ae,j[ge],Q);if(Pe===null){ae===null&&(ae=it);break}n&&ae&&Pe.alternate===null&&s(N,ae),P=p(Pe,P,ge),oe===null?ie=Pe:oe.sibling=Pe,oe=Pe,ae=it}if(ge===j.length)return o(N,ae),Ue&&Dr(N,ge),ie;if(ae===null){for(;gege?(it=ae,ae=null):it=ae.sibling;var lr=$(N,ae,Pe.value,Q);if(lr===null){ae===null&&(ae=it);break}n&&ae&&lr.alternate===null&&s(N,ae),P=p(lr,P,ge),oe===null?ie=lr:oe.sibling=lr,oe=lr,ae=it}if(Pe.done)return o(N,ae),Ue&&Dr(N,ge),ie;if(ae===null){for(;!Pe.done;ge++,Pe=j.next())Pe=W(N,Pe.value,Q),Pe!==null&&(P=p(Pe,P,ge),oe===null?ie=Pe:oe.sibling=Pe,oe=Pe);return Ue&&Dr(N,ge),ie}for(ae=l(N,ae);!Pe.done;ge++,Pe=j.next())Pe=Y(ae,N,ge,Pe.value,Q),Pe!==null&&(n&&Pe.alternate!==null&&ae.delete(Pe.key===null?ge:Pe.key),P=p(Pe,P,ge),oe===null?ie=Pe:oe.sibling=Pe,oe=Pe);return n&&ae.forEach(function(X1){return s(N,X1)}),Ue&&Dr(N,ge),ie}function Ge(N,P,j,Q){if(typeof j=="object"&&j!==null&&j.type===G&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case B:e:{for(var ie=j.key,oe=P;oe!==null;){if(oe.key===ie){if(ie=j.type,ie===G){if(oe.tag===7){o(N,oe.sibling),P=d(oe,j.props.children),P.return=N,N=P;break e}}else if(oe.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===we&&Ip(ie)===oe.type){o(N,oe.sibling),P=d(oe,j.props),P.ref=Di(N,oe,j),P.return=N,N=P;break e}o(N,oe);break}else s(N,oe);oe=oe.sibling}j.type===G?(P=Hr(j.props.children,N.mode,Q,j.key),P.return=N,N=P):(Q=za(j.type,j.key,j.props,null,N.mode,Q),Q.ref=Di(N,P,j),Q.return=N,N=Q)}return x(N);case K:e:{for(oe=j.key;P!==null;){if(P.key===oe)if(P.tag===4&&P.stateNode.containerInfo===j.containerInfo&&P.stateNode.implementation===j.implementation){o(N,P.sibling),P=d(P,j.children||[]),P.return=N,N=P;break e}else{o(N,P);break}else s(N,P);P=P.sibling}P=Mc(j,N.mode,Q),P.return=N,N=P}return x(N);case we:return oe=j._init,Ge(N,P,oe(j._payload),Q)}if(di(j))return ee(N,P,j,Q);if(se(j))return re(N,P,j,Q);va(N,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,P!==null&&P.tag===6?(o(N,P.sibling),P=d(P,j),P.return=N,N=P):(o(N,P),P=Dc(j,N.mode,Q),P.return=N,N=P),x(N)):o(N,P)}return Ge}var Rs=Lp(!0),Dp=Lp(!1),xa=Xn(null),wa=null,_s=null,qu=null;function Ku(){qu=_s=wa=null}function Qu(n){var s=xa.current;Ve(xa),n._currentValue=s}function Gu(n,s,o){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===o)break;n=n.return}}function Ns(n,s){wa=n,qu=_s=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&s)!==0&&(At=!0),n.firstContext=null)}function Ht(n){var s=n._currentValue;if(qu!==n)if(n={context:n,memoizedValue:s,next:null},_s===null){if(wa===null)throw Error(r(308));_s=n,wa.dependencies={lanes:0,firstContext:n}}else _s=_s.next=n;return s}var Mr=null;function Yu(n){Mr===null?Mr=[n]:Mr.push(n)}function Mp(n,s,o,l){var d=s.interleaved;return d===null?(o.next=o,Yu(s)):(o.next=d.next,d.next=o),s.interleaved=o,_n(n,l)}function _n(n,s){n.lanes|=s;var o=n.alternate;for(o!==null&&(o.lanes|=s),o=n,n=n.return;n!==null;)n.childLanes|=s,o=n.alternate,o!==null&&(o.childLanes|=s),o=n,n=n.return;return o.tag===3?o.stateNode:null}var er=!1;function Xu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fp(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Nn(n,s){return{eventTime:n,lane:s,tag:0,payload:null,callback:null,next:null}}function tr(n,s,o){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ce&2)!==0){var d=l.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),l.pending=s,_n(n,o)}return d=l.interleaved,d===null?(s.next=s,Yu(l)):(s.next=d.next,d.next=s),l.interleaved=s,_n(n,o)}function Sa(n,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194240)!==0)){var l=s.lanes;l&=n.pendingLanes,o|=l,s.lanes=o,du(n,o)}}function Vp(n,s){var o=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var d=null,p=null;if(o=o.firstBaseUpdate,o!==null){do{var x={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};p===null?d=p=x:p=p.next=x,o=o.next}while(o!==null);p===null?d=p=s:p=p.next=s}else d=p=s;o={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:l.shared,effects:l.effects},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=s:n.next=s,o.lastBaseUpdate=s}function ba(n,s,o,l){var d=n.updateQueue;er=!1;var p=d.firstBaseUpdate,x=d.lastBaseUpdate,T=d.shared.pending;if(T!==null){d.shared.pending=null;var C=T,D=C.next;C.next=null,x===null?p=D:x.next=D,x=C;var H=n.alternate;H!==null&&(H=H.updateQueue,T=H.lastBaseUpdate,T!==x&&(T===null?H.firstBaseUpdate=D:T.next=D,H.lastBaseUpdate=C))}if(p!==null){var W=d.baseState;x=0,H=D=C=null,T=p;do{var $=T.lane,Y=T.eventTime;if((l&$)===$){H!==null&&(H=H.next={eventTime:Y,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ee=n,re=T;switch($=s,Y=o,re.tag){case 1:if(ee=re.payload,typeof ee=="function"){W=ee.call(Y,W,$);break e}W=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=re.payload,$=typeof ee=="function"?ee.call(Y,W,$):ee,$==null)break e;W=U({},W,$);break e;case 2:er=!0}}T.callback!==null&&T.lane!==0&&(n.flags|=64,$=d.effects,$===null?d.effects=[T]:$.push(T))}else Y={eventTime:Y,lane:$,tag:T.tag,payload:T.payload,callback:T.callback,next:null},H===null?(D=H=Y,C=W):H=H.next=Y,x|=$;if(T=T.next,T===null){if(T=d.shared.pending,T===null)break;$=T,T=$.next,$.next=null,d.lastBaseUpdate=$,d.shared.pending=null}}while(!0);if(H===null&&(C=W),d.baseState=C,d.firstBaseUpdate=D,d.lastBaseUpdate=H,s=d.shared.interleaved,s!==null){d=s;do x|=d.lane,d=d.next;while(d!==s)}else p===null&&(d.shared.lanes=0);Br|=x,n.lanes=x,n.memoizedState=W}}function Bp(n,s,o){if(n=s.effects,s.effects=null,n!==null)for(s=0;so?o:4,n(!0);var l=nc.transition;nc.transition={};try{n(!1),s()}finally{Oe=o,nc.transition=l}}function im(){return Wt().memoizedState}function S1(n,s,o){var l=ir(n);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},om(n))am(s,o);else if(o=Mp(n,s,o,l),o!==null){var d=bt();an(o,n,l,d),lm(o,s,l)}}function b1(n,s,o){var l=ir(n),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(om(n))am(s,d);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var x=s.lastRenderedState,T=p(x,o);if(d.hasEagerState=!0,d.eagerState=T,tn(T,x)){var C=s.interleaved;C===null?(d.next=d,Yu(s)):(d.next=C.next,C.next=d),s.interleaved=d;return}}catch{}finally{}o=Mp(n,s,d,l),o!==null&&(d=bt(),an(o,n,l,d),lm(o,s,l))}}function om(n){var s=n.alternate;return n===$e||s!==null&&s===$e}function am(n,s){Bi=Ta=!0;var o=n.pending;o===null?s.next=s:(s.next=o.next,o.next=s),n.pending=s}function lm(n,s,o){if((o&4194240)!==0){var l=s.lanes;l&=n.pendingLanes,o|=l,s.lanes=o,du(n,o)}}var Pa={readContext:Ht,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},k1={readContext:Ht,useCallback:function(n,s){return gn().memoizedState=[n,s===void 0?null:s],n},useContext:Ht,useEffect:Xp,useImperativeHandle:function(n,s,o){return o=o!=null?o.concat([n]):null,Ca(4194308,4,em.bind(null,s,n),o)},useLayoutEffect:function(n,s){return Ca(4194308,4,n,s)},useInsertionEffect:function(n,s){return Ca(4,2,n,s)},useMemo:function(n,s){var o=gn();return s=s===void 0?null:s,n=n(),o.memoizedState=[n,s],n},useReducer:function(n,s,o){var l=gn();return s=o!==void 0?o(s):s,l.memoizedState=l.baseState=s,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:s},l.queue=n,n=n.dispatch=S1.bind(null,$e,n),[l.memoizedState,n]},useRef:function(n){var s=gn();return n={current:n},s.memoizedState=n},useState:Gp,useDebugValue:uc,useDeferredValue:function(n){return gn().memoizedState=n},useTransition:function(){var n=Gp(!1),s=n[0];return n=w1.bind(null,n[1]),gn().memoizedState=n,[s,n]},useMutableSource:function(){},useSyncExternalStore:function(n,s,o){var l=$e,d=gn();if(Ue){if(o===void 0)throw Error(r(407));o=o()}else{if(o=s(),st===null)throw Error(r(349));(Vr&30)!==0||Hp(l,s,o)}d.memoizedState=o;var p={value:o,getSnapshot:s};return d.queue=p,Xp(qp.bind(null,l,p,n),[n]),l.flags|=2048,$i(9,Wp.bind(null,l,p,o,s),void 0,null),o},useId:function(){var n=gn(),s=st.identifierPrefix;if(Ue){var o=Rn,l=Pn;o=(l&~(1<<32-en(l)-1)).toString(32)+o,s=":"+s+"R"+o,o=Ui++,0<\/script>",n=n.removeChild(n.firstChild)):typeof l.is=="string"?n=x.createElement(o,{is:l.is}):(n=x.createElement(o),o==="select"&&(x=n,l.multiple?x.multiple=!0:l.size&&(x.size=l.size))):n=x.createElementNS(n,o),n[pn]=s,n[Ii]=l,Pm(n,s,!1,!1),s.stateNode=n;e:{switch(x=tu(o,l),o){case"dialog":Fe("cancel",n),Fe("close",n),d=l;break;case"iframe":case"object":case"embed":Fe("load",n),d=l;break;case"video":case"audio":for(d=0;dDs&&(s.flags|=128,l=!0,Hi(p,!1),s.lanes=4194304)}else{if(!l)if(n=ka(x),n!==null){if(s.flags|=128,l=!0,o=n.updateQueue,o!==null&&(s.updateQueue=o,s.flags|=4),Hi(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!Ue)return mt(s),null}else 2*Qe()-p.renderingStartTime>Ds&&o!==1073741824&&(s.flags|=128,l=!0,Hi(p,!1),s.lanes=4194304);p.isBackwards?(x.sibling=s.child,s.child=x):(o=p.last,o!==null?o.sibling=x:s.child=x,p.last=x)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=Qe(),s.sibling=null,o=ze.current,Me(ze,l?o&1|2:o&1),s):(mt(s),null);case 22:case 23:return Oc(),l=s.memoizedState!==null,n!==null&&n.memoizedState!==null!==l&&(s.flags|=8192),l&&(s.mode&1)!==0?(Vt&1073741824)!==0&&(mt(s),s.subtreeFlags&6&&(s.flags|=8192)):mt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function N1(n,s){switch(zu(s),s.tag){case 1:return Ct(s.type)&&fa(),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return js(),Ve(Tt),Ve(ht),tc(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 5:return Zu(s),null;case 13:if(Ve(ze),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Ps()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return Ve(ze),null;case 4:return js(),null;case 10:return Qu(s.type._context),null;case 22:case 23:return Oc(),null;case 24:return null;default:return null}}var ja=!1,gt=!1,j1=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Is(n,s){var o=n.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){We(n,s,l)}else o.current=null}function Sc(n,s,o){try{o()}catch(l){We(n,s,l)}}var Nm=!1;function O1(n,s){if(Ou=Jo,n=up(),Tu(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var d=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{o.nodeType,p.nodeType}catch{o=null;break e}var x=0,T=-1,C=-1,D=0,H=0,W=n,$=null;t:for(;;){for(var Y;W!==o||d!==0&&W.nodeType!==3||(T=x+d),W!==p||l!==0&&W.nodeType!==3||(C=x+l),W.nodeType===3&&(x+=W.nodeValue.length),(Y=W.firstChild)!==null;)$=W,W=Y;for(;;){if(W===n)break t;if($===o&&++D===d&&(T=x),$===p&&++H===l&&(C=x),(Y=W.nextSibling)!==null)break;W=$,$=W.parentNode}W=Y}o=T===-1||C===-1?null:{start:T,end:C}}else o=null}o=o||{start:0,end:0}}else o=null;for(Iu={focusedElem:n,selectionRange:o},Jo=!1,Z=s;Z!==null;)if(s=Z,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,Z=n;else for(;Z!==null;){s=Z;try{var ee=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var re=ee.memoizedProps,Ge=ee.memoizedState,N=s.stateNode,P=N.getSnapshotBeforeUpdate(s.elementType===s.type?re:rn(s.type,re),Ge);N.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var j=s.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Q){We(s,s.return,Q)}if(n=s.sibling,n!==null){n.return=s.return,Z=n;break}Z=s.return}return ee=Nm,Nm=!1,ee}function Wi(n,s,o){var l=s.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&n)===n){var p=d.destroy;d.destroy=void 0,p!==void 0&&Sc(s,o,p)}d=d.next}while(d!==l)}}function Oa(n,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&n)===n){var l=o.create;o.destroy=l()}o=o.next}while(o!==s)}}function bc(n){var s=n.ref;if(s!==null){var o=n.stateNode;switch(n.tag){case 5:n=o;break;default:n=o}typeof s=="function"?s(n):s.current=n}}function jm(n){var s=n.alternate;s!==null&&(n.alternate=null,jm(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&(delete s[pn],delete s[Ii],delete s[Fu],delete s[m1],delete s[g1])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Om(n){return n.tag===5||n.tag===3||n.tag===4}function Im(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Om(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function kc(n,s,o){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?o.nodeType===8?o.parentNode.insertBefore(n,s):o.insertBefore(n,s):(o.nodeType===8?(s=o.parentNode,s.insertBefore(n,o)):(s=o,s.appendChild(n)),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=ca));else if(l!==4&&(n=n.child,n!==null))for(kc(n,s,o),n=n.sibling;n!==null;)kc(n,s,o),n=n.sibling}function Ec(n,s,o){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?o.insertBefore(n,s):o.appendChild(n);else if(l!==4&&(n=n.child,n!==null))for(Ec(n,s,o),n=n.sibling;n!==null;)Ec(n,s,o),n=n.sibling}var at=null,sn=!1;function nr(n,s,o){for(o=o.child;o!==null;)Lm(n,s,o),o=o.sibling}function Lm(n,s,o){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(qo,o)}catch{}switch(o.tag){case 5:gt||Is(o,s);case 6:var l=at,d=sn;at=null,nr(n,s,o),at=l,sn=d,at!==null&&(sn?(n=at,o=o.stateNode,n.nodeType===8?n.parentNode.removeChild(o):n.removeChild(o)):at.removeChild(o.stateNode));break;case 18:at!==null&&(sn?(n=at,o=o.stateNode,n.nodeType===8?Mu(n.parentNode,o):n.nodeType===1&&Mu(n,o),ki(n)):Mu(at,o.stateNode));break;case 4:l=at,d=sn,at=o.stateNode.containerInfo,sn=!0,nr(n,s,o),at=l,sn=d;break;case 0:case 11:case 14:case 15:if(!gt&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){d=l=l.next;do{var p=d,x=p.destroy;p=p.tag,x!==void 0&&((p&2)!==0||(p&4)!==0)&&Sc(o,s,x),d=d.next}while(d!==l)}nr(n,s,o);break;case 1:if(!gt&&(Is(o,s),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(T){We(o,s,T)}nr(n,s,o);break;case 21:nr(n,s,o);break;case 22:o.mode&1?(gt=(l=gt)||o.memoizedState!==null,nr(n,s,o),gt=l):nr(n,s,o);break;default:nr(n,s,o)}}function Dm(n){var s=n.updateQueue;if(s!==null){n.updateQueue=null;var o=n.stateNode;o===null&&(o=n.stateNode=new j1),s.forEach(function(l){var d=z1.bind(null,n,l);o.has(l)||(o.add(l),l.then(d,d))})}}function on(n,s){var o=s.deletions;if(o!==null)for(var l=0;ld&&(d=x),l&=~p}if(l=d,l=Qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*L1(l/1960))-l,10n?16:n,sr===null)var l=!1;else{if(n=sr,sr=null,Fa=0,(Ce&6)!==0)throw Error(r(331));var d=Ce;for(Ce|=4,Z=n.current;Z!==null;){var p=Z,x=p.child;if((Z.flags&16)!==0){var T=p.deletions;if(T!==null){for(var C=0;CQe()-Ac?zr(n,0):Cc|=o),Rt(n,s)}function Gm(n,s){s===0&&((n.mode&1)===0?s=1:(s=Qo,Qo<<=1,(Qo&130023424)===0&&(Qo=4194304)));var o=bt();n=_n(n,s),n!==null&&(vi(n,s,o),Rt(n,o))}function U1(n){var s=n.memoizedState,o=0;s!==null&&(o=s.retryLane),Gm(n,o)}function z1(n,s){var o=0;switch(n.tag){case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(o=d.retryLane);break;case 19:l=n.stateNode;break;default:throw Error(r(314))}l!==null&&l.delete(s),Gm(n,o)}var Ym;Ym=function(n,s,o){if(n!==null)if(n.memoizedProps!==s.pendingProps||Tt.current)At=!0;else{if((n.lanes&o)===0&&(s.flags&128)===0)return At=!1,R1(n,s,o);At=(n.flags&131072)!==0}else At=!1,Ue&&(s.flags&1048576)!==0&&Rp(s,ga,s.index);switch(s.lanes=0,s.tag){case 2:var l=s.type;Na(n,s),n=s.pendingProps;var d=Ts(s,ht.current);Ns(s,o),d=sc(null,s,l,n,d,o);var p=ic();return s.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Ct(l)?(p=!0,ha(s)):p=!1,s.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Xu(s),d.updater=Ra,s.stateNode=d,d._reactInternals=s,dc(s,l,n,o),s=mc(null,s,l,!0,p,o)):(s.tag=0,Ue&&p&&Uu(s),St(null,s,d,o),s=s.child),s;case 16:l=s.elementType;e:{switch(Na(n,s),n=s.pendingProps,d=l._init,l=d(l._payload),s.type=l,d=s.tag=H1(l),n=rn(l,n),d){case 0:s=pc(null,s,l,n,o);break e;case 1:s=bm(null,s,l,n,o);break e;case 11:s=ym(null,s,l,n,o);break e;case 14:s=vm(null,s,l,rn(l.type,n),o);break e}throw Error(r(306,l,""))}return s;case 0:return l=s.type,d=s.pendingProps,d=s.elementType===l?d:rn(l,d),pc(n,s,l,d,o);case 1:return l=s.type,d=s.pendingProps,d=s.elementType===l?d:rn(l,d),bm(n,s,l,d,o);case 3:e:{if(km(s),n===null)throw Error(r(387));l=s.pendingProps,p=s.memoizedState,d=p.element,Fp(n,s),ba(s,l,null,o);var x=s.memoizedState;if(l=x.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){d=Os(Error(r(423)),s),s=Em(n,s,l,o,d);break e}else if(l!==d){d=Os(Error(r(424)),s),s=Em(n,s,l,o,d);break e}else for(Ft=Yn(s.stateNode.containerInfo.firstChild),Mt=s,Ue=!0,nn=null,o=Dp(s,null,l,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ps(),l===d){s=jn(n,s,o);break e}St(n,s,l,o)}s=s.child}return s;case 5:return Up(s),n===null&&Hu(s),l=s.type,d=s.pendingProps,p=n!==null?n.memoizedProps:null,x=d.children,Lu(l,d)?x=null:p!==null&&Lu(l,p)&&(s.flags|=32),Sm(n,s),St(n,s,x,o),s.child;case 6:return n===null&&Hu(s),null;case 13:return Tm(n,s,o);case 4:return Ju(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=Rs(s,null,l,o):St(n,s,l,o),s.child;case 11:return l=s.type,d=s.pendingProps,d=s.elementType===l?d:rn(l,d),ym(n,s,l,d,o);case 7:return St(n,s,s.pendingProps,o),s.child;case 8:return St(n,s,s.pendingProps.children,o),s.child;case 12:return St(n,s,s.pendingProps.children,o),s.child;case 10:e:{if(l=s.type._context,d=s.pendingProps,p=s.memoizedProps,x=d.value,Me(xa,l._currentValue),l._currentValue=x,p!==null)if(tn(p.value,x)){if(p.children===d.children&&!Tt.current){s=jn(n,s,o);break e}}else for(p=s.child,p!==null&&(p.return=s);p!==null;){var T=p.dependencies;if(T!==null){x=p.child;for(var C=T.firstContext;C!==null;){if(C.context===l){if(p.tag===1){C=Nn(-1,o&-o),C.tag=2;var D=p.updateQueue;if(D!==null){D=D.shared;var H=D.pending;H===null?C.next=C:(C.next=H.next,H.next=C),D.pending=C}}p.lanes|=o,C=p.alternate,C!==null&&(C.lanes|=o),Gu(p.return,o,s),T.lanes|=o;break}C=C.next}}else if(p.tag===10)x=p.type===s.type?null:p.child;else if(p.tag===18){if(x=p.return,x===null)throw Error(r(341));x.lanes|=o,T=x.alternate,T!==null&&(T.lanes|=o),Gu(x,o,s),x=p.sibling}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===s){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}St(n,s,d.children,o),s=s.child}return s;case 9:return d=s.type,l=s.pendingProps.children,Ns(s,o),d=Ht(d),l=l(d),s.flags|=1,St(n,s,l,o),s.child;case 14:return l=s.type,d=rn(l,s.pendingProps),d=rn(l.type,d),vm(n,s,l,d,o);case 15:return xm(n,s,s.type,s.pendingProps,o);case 17:return l=s.type,d=s.pendingProps,d=s.elementType===l?d:rn(l,d),Na(n,s),s.tag=1,Ct(l)?(n=!0,ha(s)):n=!1,Ns(s,o),cm(s,l,d),dc(s,l,d,o),mc(null,s,l,!0,n,o);case 19:return Am(n,s,o);case 22:return wm(n,s,o)}throw Error(r(156,s.tag))};function Xm(n,s){return _h(n,s)}function $1(n,s,o,l){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(n,s,o,l){return new $1(n,s,o,l)}function Lc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function H1(n){if(typeof n=="function")return Lc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===Re)return 11;if(n===De)return 14}return 2}function ar(n,s){var o=n.alternate;return o===null?(o=Kt(n.tag,s,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=s,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&14680064,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,s=n.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o}function za(n,s,o,l,d,p){var x=2;if(l=n,typeof n=="function")Lc(n)&&(x=1);else if(typeof n=="string")x=5;else e:switch(n){case G:return Hr(o.children,d,p,s);case L:x=8,d|=8;break;case J:return n=Kt(12,o,s,d|2),n.elementType=J,n.lanes=p,n;case Ie:return n=Kt(13,o,s,d),n.elementType=Ie,n.lanes=p,n;case _e:return n=Kt(19,o,s,d),n.elementType=_e,n.lanes=p,n;case fe:return $a(o,d,p,s);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case de:x=10;break e;case me:x=9;break e;case Re:x=11;break e;case De:x=14;break e;case we:x=16,l=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return s=Kt(x,o,s,d),s.elementType=n,s.type=l,s.lanes=p,s}function Hr(n,s,o,l){return n=Kt(7,n,l,s),n.lanes=o,n}function $a(n,s,o,l){return n=Kt(22,n,l,s),n.elementType=fe,n.lanes=o,n.stateNode={isHidden:!1},n}function Dc(n,s,o){return n=Kt(6,n,null,s),n.lanes=o,n}function Mc(n,s,o){return s=Kt(4,n.children!==null?n.children:[],n.key,s),s.lanes=o,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}function W1(n,s,o,l,d){this.tag=s,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cu(0),this.expirationTimes=cu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cu(0),this.identifierPrefix=l,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Fc(n,s,o,l,d,p,x,T,C){return n=new W1(n,s,o,T,C),s===1?(s=1,p===!0&&(s|=8)):s=0,p=Kt(3,null,null,s),n.current=p,p.stateNode=n,p.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xu(p),n}function q1(n,s,o){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Wc.exports=ob(),Wc.exports}var fg;function ab(){if(fg)return Xa;fg=1;var t=Yv();return Xa.createRoot=t.createRoot,Xa.hydrateRoot=t.hydrateRoot,Xa}var lb=ab();const ub=Gv(lb),cb=20,db=1e6,Fn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Qc=0;function fb(){return Qc=(Qc+1)%Number.MAX_VALUE,Qc.toString()}const Gc=new Map,hg=t=>{if(Gc.has(t))return;const e=setTimeout(()=>{Gc.delete(t),ho({type:Fn.REMOVE_TOAST,toastId:t})},db);Gc.set(t,e)},hb=(t,e)=>{switch(e.type){case Fn.ADD_TOAST:return{...t,toasts:[e.toast,...t.toasts].slice(0,cb)};case Fn.UPDATE_TOAST:return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case Fn.DISMISS_TOAST:{const{toastId:r}=e;return r?hg(r):t.toasts.forEach(i=>{hg(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===r||r===void 0?{...i,open:!1}:i)}}case Fn.REMOVE_TOAST:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},ul=[];let cl={toasts:[]};function ho(t){cl=hb(cl,t),ul.forEach(e=>{e(cl)})}function pb({...t}){const e=fb(),r=a=>ho({type:Fn.UPDATE_TOAST,toast:{...a,id:e}}),i=()=>ho({type:Fn.DISMISS_TOAST,toastId:e});return ho({type:Fn.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:a=>{a||i()}}}),{id:e,dismiss:i,update:r}}function mb(){const[t,e]=M.useState(cl);return M.useEffect(()=>(ul.push(e),()=>{const r=ul.indexOf(e);r>-1&&ul.splice(r,1)}),[t]),{...t,toast:pb,dismiss:r=>ho({type:Fn.DISMISS_TOAST,toastId:r})}}function Xv(t){var e,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;etypeof t=="boolean"?`${t}`:t===0?"0":t,mg=Jv,gb=(t,e)=>r=>{var i;if((e==null?void 0:e.variants)==null)return mg(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:u}=e,c=Object.keys(a).map(m=>{const g=r==null?void 0:r[m],v=u==null?void 0:u[m];if(g===null)return null;const w=pg(g)||pg(v);return a[m][w]}),f=r&&Object.entries(r).reduce((m,g)=>{let[v,w]=g;return w===void 0||(m[v]=w),m},{}),h=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((m,g)=>{let{class:v,className:w,...E}=g;return Object.entries(E).every(b=>{let[k,S]=b;return Array.isArray(S)?S.includes({...u,...f}[k]):{...u,...f}[k]===S})?[...m,v,w]:m},[]);return mg(t,c,h,r==null?void 0:r.class,r==null?void 0:r.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zv=(...t)=>t.filter((e,r,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===r).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var vb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xb=M.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:a="",children:u,iconNode:c,...f},h)=>M.createElement("svg",{ref:h,...vb,width:e,height:e,stroke:t,strokeWidth:i?Number(r)*24/Number(e):r,className:Zv("lucide",a),...f},[...c.map(([m,g])=>M.createElement(m,g)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pr=(t,e)=>{const r=M.forwardRef(({className:i,...a},u)=>M.createElement(xb,{ref:u,iconNode:e,className:Zv(`lucide-${yb(t)}`,i),...a}));return r.displayName=`${t}`,r};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Sb=Pr("ArrowRight",wb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bb=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],kb=Pr("Linkedin",bb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Eb=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Tb=Pr("Mail",Eb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cb=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Ab=Pr("Menu",Cb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pb=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],e0=Pr("Mountain",Pb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rb=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],t0=Pr("Shield",Rb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _b=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],Nb=Pr("Twitter",_b);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],n0=Pr("X",jb),Ob=(t,e)=>{const r=new Array(t.length+e.length);for(let i=0;i({classGroupId:t,validator:e}),r0=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),Sl="-",gg=[],Lb="arbitrary..",Db=t=>{const e=Fb(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Mb(c);const f=c.split(Sl),h=f[0]===""&&f.length>1?1:0;return s0(f,h,e)},getConflictingClassGroupIds:(c,f)=>{if(f){const h=i[c],m=r[c];return h?m?Ob(m,h):h:m||gg}return r[c]||gg}}},s0=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],u=r.nextPart.get(a);if(u){const m=s0(t,e+1,u);if(m)return m}const c=r.validators;if(c===null)return;const f=e===0?t.join(Sl):t.slice(e).join(Sl),h=c.length;for(let m=0;mt.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),i=e.slice(0,r);return i?Lb+i:void 0})(),Fb=t=>{const{theme:e,classGroups:r}=t;return Vb(r,e)},Vb=(t,e)=>{const r=r0();for(const i in t){const a=t[i];hf(a,r,i,e)}return r},hf=(t,e,r,i)=>{const a=t.length;for(let u=0;u{if(typeof t=="string"){Ub(t,e,r);return}if(typeof t=="function"){zb(t,e,r,i);return}$b(t,e,r,i)},Ub=(t,e,r)=>{const i=t===""?e:i0(e,t);i.classGroupId=r},zb=(t,e,r,i)=>{if(Hb(t)){hf(t(i),e,r,i);return}e.validators===null&&(e.validators=[]),e.validators.push(Ib(r,t))},$b=(t,e,r,i)=>{const a=Object.entries(t),u=a.length;for(let c=0;c{let r=t;const i=e.split(Sl),a=i.length;for(let u=0;u"isThemeGetter"in t&&t.isThemeGetter===!0,Wb=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),i=Object.create(null);const a=(u,c)=>{r[u]=c,e++,e>t&&(e=0,i=r,r=Object.create(null))};return{get(u){let c=r[u];if(c!==void 0)return c;if((c=i[u])!==void 0)return a(u,c),c},set(u,c){u in r?r[u]=c:a(u,c)}}},wd="!",yg=":",qb=[],vg=(t,e,r,i,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:i,isExternal:a}),Kb=t=>{const{prefix:e,experimentalParseClassName:r}=t;let i=a=>{const u=[];let c=0,f=0,h=0,m;const g=a.length;for(let k=0;kh?m-h:void 0;return vg(u,E,w,b)};if(e){const a=e+yg,u=i;i=c=>c.startsWith(a)?u(c.slice(a.length)):vg(qb,!1,c,void 0,!0)}if(r){const a=i;i=u=>r({className:u,parseClassName:a})}return i},Qb=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,i)=>{e.set(r,1e6+i)}),r=>{const i=[];let a=[];for(let u=0;u0&&(a.sort(),i.push(...a),a=[]),i.push(c)):a.push(c)}return a.length>0&&(a.sort(),i.push(...a)),i}},Gb=t=>({cache:Wb(t.cacheSize),parseClassName:Kb(t),sortModifiers:Qb(t),...Db(t)}),Yb=/\s+/,Xb=(t,e)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:u}=e,c=[],f=t.trim().split(Yb);let h="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:v,modifiers:w,hasImportantModifier:E,baseClassName:b,maybePostfixModifierPosition:k}=r(g);if(v){h=g+(h.length>0?" "+h:h);continue}let S=!!k,R=i(S?b.substring(0,k):b);if(!R){if(!S){h=g+(h.length>0?" "+h:h);continue}if(R=i(b),!R){h=g+(h.length>0?" "+h:h);continue}S=!1}const V=w.length===0?"":w.length===1?w[0]:u(w).join(":"),I=E?V+wd:V,O=I+R;if(c.indexOf(O)>-1)continue;c.push(O);const B=a(R,S);for(let K=0;K0?" "+h:h)}return h},Jb=(...t)=>{let e=0,r,i,a="";for(;e{if(typeof t=="string")return t;let e,r="";for(let i=0;i{let r,i,a,u;const c=h=>{const m=e.reduce((g,v)=>v(g),t());return r=Gb(m),i=r.cache.get,a=r.cache.set,u=f,f(h)},f=h=>{const m=i(h);if(m)return m;const g=Xb(h,r);return a(h,g),g};return u=c,(...h)=>u(Jb(...h))},ek=[],nt=t=>{const e=r=>r[t]||ek;return e.isThemeGetter=!0,e},a0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,l0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tk=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ik=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ok=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=t=>tk.test(t),Se=t=>!!t&&!Number.isNaN(Number(t)),cr=t=>!!t&&Number.isInteger(Number(t)),Yc=t=>t.endsWith("%")&&Se(t.slice(0,-1)),In=t=>nk.test(t),u0=()=>!0,ak=t=>rk.test(t)&&!sk.test(t),pf=()=>!1,lk=t=>ik.test(t),uk=t=>ok.test(t),ck=t=>!te(t)&&!ne(t),dk=t=>Rr(t,f0,pf),te=t=>a0.test(t),Wr=t=>Rr(t,h0,ak),xg=t=>Rr(t,xk,Se),fk=t=>Rr(t,m0,u0),hk=t=>Rr(t,p0,pf),wg=t=>Rr(t,c0,pf),pk=t=>Rr(t,d0,uk),Ja=t=>Rr(t,g0,lk),ne=t=>l0.test(t),Xi=t=>ds(t,h0),mk=t=>ds(t,p0),Sg=t=>ds(t,c0),gk=t=>ds(t,f0),yk=t=>ds(t,d0),Za=t=>ds(t,g0,!0),vk=t=>ds(t,m0,!0),Rr=(t,e,r)=>{const i=a0.exec(t);return i?i[1]?e(i[1]):r(i[2]):!1},ds=(t,e,r=!1)=>{const i=l0.exec(t);return i?i[1]?e(i[1]):r:!1},c0=t=>t==="position"||t==="percentage",d0=t=>t==="image"||t==="url",f0=t=>t==="length"||t==="size"||t==="bg-size",h0=t=>t==="length",xk=t=>t==="number",p0=t=>t==="family-name",m0=t=>t==="number"||t==="weight",g0=t=>t==="shadow",wk=()=>{const t=nt("color"),e=nt("font"),r=nt("text"),i=nt("font-weight"),a=nt("tracking"),u=nt("leading"),c=nt("breakpoint"),f=nt("container"),h=nt("spacing"),m=nt("radius"),g=nt("shadow"),v=nt("inset-shadow"),w=nt("text-shadow"),E=nt("drop-shadow"),b=nt("blur"),k=nt("perspective"),S=nt("aspect"),R=nt("ease"),V=nt("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...O(),ne,te],K=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],L=()=>[ne,te,h],J=()=>[ur,"full","auto",...L()],de=()=>[cr,"none","subgrid",ne,te],me=()=>["auto",{span:["full",cr,ne,te]},cr,ne,te],Re=()=>[cr,"auto",ne,te],Ie=()=>["auto","min","max","fr",ne,te],_e=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],De=()=>["start","end","center","stretch","center-safe","end-safe"],we=()=>["auto",...L()],fe=()=>[ur,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],q=()=>[ur,"screen","full","dvw","lvw","svw","min","max","fit",...L()],se=()=>[ur,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],U=()=>[t,ne,te],_=()=>[...O(),Sg,wg,{position:[ne,te]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",gk,dk,{size:[ne,te]}],ve=()=>[Yc,Xi,Wr],le=()=>["","none","full",m,ne,te],he=()=>["",Se,Xi,Wr],Ne=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Se,Yc,Sg,wg],ft=()=>["","none",b,ne,te],Tn=()=>["none",Se,ne,te],Nr=()=>["none",Se,ne,te],zn=()=>[Se,ne,te],$n=()=>[ur,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[In],breakpoint:[In],color:[u0],container:[In],"drop-shadow":[In],ease:["in","out","in-out"],font:[ck],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[In],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[In],shadow:[In],spacing:["px",Se],text:[In],"text-shadow":[In],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ur,te,ne,S]}],container:["container"],columns:[{columns:[Se,te,ne,f]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{"inset-s":J(),start:J()}],end:[{"inset-e":J(),end:J()}],"inset-bs":[{"inset-bs":J()}],"inset-be":[{"inset-be":J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[cr,"auto",ne,te]}],basis:[{basis:[ur,"full","auto",f,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,ur,"auto","initial","none",te]}],grow:[{grow:["",Se,ne,te]}],shrink:[{shrink:["",Se,ne,te]}],order:[{order:[cr,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":de()}],"col-start-end":[{col:me()}],"col-start":[{"col-start":Re()}],"col-end":[{"col-end":Re()}],"grid-rows":[{"grid-rows":de()}],"row-start-end":[{row:me()}],"row-start":[{"row-start":Re()}],"row-end":[{"row-end":Re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ie()}],"auto-rows":[{"auto-rows":Ie()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[..._e(),"normal"]}],"justify-items":[{"justify-items":[...De(),"normal"]}],"justify-self":[{"justify-self":["auto",...De()]}],"align-content":[{content:["normal",..._e()]}],"align-items":[{items:[...De(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...De(),{baseline:["","last"]}]}],"place-content":[{"place-content":_e()}],"place-items":[{"place-items":[...De(),"baseline"]}],"place-self":[{"place-self":["auto",...De()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:we()}],mx:[{mx:we()}],my:[{my:we()}],ms:[{ms:we()}],me:[{me:we()}],mbs:[{mbs:we()}],mbe:[{mbe:we()}],mt:[{mt:we()}],mr:[{mr:we()}],mb:[{mb:we()}],ml:[{ml:we()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:fe()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[f,"screen",...fe()]}],"min-w":[{"min-w":[f,"screen","none",...fe()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...fe()]}],h:[{h:["screen","lh",...fe()]}],"min-h":[{"min-h":["screen","lh","none",...fe()]}],"max-h":[{"max-h":["screen","lh",...fe()]}],"font-size":[{text:["base",r,Xi,Wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,vk,fk]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yc,te]}],"font-family":[{font:[mk,hk,e]}],"font-features":[{"font-features":[te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ne,te]}],"line-clamp":[{"line-clamp":[Se,"none",ne,xg]}],leading:[{leading:[u,...L()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",ne,Wr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Se,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cr,ne,te],radial:["",ne,te],conic:[cr,ne,te]},yk,pk]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:ve()}],"gradient-via-pos":[{via:ve()}],"gradient-to-pos":[{to:ve()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,ne,te]}],"outline-w":[{outline:["",Se,Xi,Wr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",g,Za,Ja]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",v,Za,Ja]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Se,Wr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",w,Za,Ja]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Se,ne,te]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:ft()}],brightness:[{brightness:[Se,ne,te]}],contrast:[{contrast:[Se,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",E,Za,Ja]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Se,ne,te]}],"hue-rotate":[{"hue-rotate":[Se,ne,te]}],invert:[{invert:["",Se,ne,te]}],saturate:[{saturate:[Se,ne,te]}],sepia:[{sepia:["",Se,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":ft()}],"backdrop-brightness":[{"backdrop-brightness":[Se,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[Se,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",Se,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[Se,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[Se,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,ne,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",ne,te]}],ease:[{ease:["linear","initial",R,ne,te]}],delay:[{delay:[Se,ne,te]}],animate:[{animate:["none",V,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ne,te]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Tn()}],"rotate-x":[{"rotate-x":Tn()}],"rotate-y":[{"rotate-y":Tn()}],"rotate-z":[{"rotate-z":Tn()}],scale:[{scale:Nr()}],"scale-x":[{"scale-x":Nr()}],"scale-y":[{"scale-y":Nr()}],"scale-z":[{"scale-z":Nr()}],"scale-3d":["scale-3d"],skew:[{skew:zn()}],"skew-x":[{"skew-x":zn()}],"skew-y":[{"skew-y":zn()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$n()}],"translate-x":[{"translate-x":$n()}],"translate-y":[{"translate-y":$n()}],"translate-z":[{"translate-z":$n()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne,te]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Se,Xi,Wr,xg]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Sk=Zb(wk);function No(...t){return Sk(Jv(t))}const y0=M.forwardRef(({...t},e)=>y.jsx("div",{ref:e,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...t}));y0.displayName="ToastProvider";const v0=M.forwardRef(({...t},e)=>y.jsx("div",{ref:e,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...t}));v0.displayName="ToastViewport";const bk=gb("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),x0=M.forwardRef(({className:t,variant:e,...r},i)=>y.jsx("div",{ref:i,className:No(bk({variant:e}),t),...r}));x0.displayName="Toast";const kk=M.forwardRef(({className:t,...e},r)=>y.jsx("div",{ref:r,className:No("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));kk.displayName="ToastAction";const w0=M.forwardRef(({className:t,...e},r)=>y.jsx("button",{ref:r,className:No("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:y.jsx(n0,{className:"h-4 w-4"})}));w0.displayName="ToastClose";const S0=M.forwardRef(({className:t,...e},r)=>y.jsx("div",{ref:r,className:No("text-sm font-semibold",t),...e}));S0.displayName="ToastTitle";const b0=M.forwardRef(({className:t,...e},r)=>y.jsx("div",{ref:r,className:No("text-sm opacity-90",t),...e}));b0.displayName="ToastDescription";function Ek(){const{toasts:t}=mb();return y.jsxs(y0,{children:[t.map(function({id:e,title:r,description:i,action:a,...u}){return y.jsxs(x0,{...u,children:[y.jsxs("div",{className:"grid gap-1",children:[r&&y.jsx(S0,{children:r}),i&&y.jsx(b0,{children:i})]}),a,y.jsx(w0,{})]},e)}),y.jsx(v0,{})]})}var jo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Tk={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},mr,df,Vv,Ck=(Vv=class{constructor(){ue(this,mr,Tk);ue(this,df,!1)}setTimeoutProvider(t){X(this,mr,t)}setTimeout(t,e){return A(this,mr).setTimeout(t,e)}clearTimeout(t){A(this,mr).clearTimeout(t)}setInterval(t,e){return A(this,mr).setInterval(t,e)}clearInterval(t){A(this,mr).clearInterval(t)}},mr=new WeakMap,df=new WeakMap,Vv),Gr=new Ck;function Ak(t){setTimeout(t,0)}var us=typeof window>"u"||"Deno"in globalThis;function jt(){}function Pk(t,e){return typeof t=="function"?t(e):t}function Sd(t){return typeof t=="number"&&t>=0&&t!==1/0}function k0(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Er(t,e){return typeof t=="function"?t(e):t}function Jt(t,e){return typeof t=="function"?t(e):t}function bg(t,e){const{type:r="all",exact:i,fetchStatus:a,predicate:u,queryKey:c,stale:f}=t;if(c){if(i){if(e.queryHash!==mf(c,e.options))return!1}else if(!wo(e.queryKey,c))return!1}if(r!=="all"){const h=e.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||a&&a!==e.state.fetchStatus||u&&!u(e))}function kg(t,e){const{exact:r,status:i,predicate:a,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(r){if(xo(e.options.mutationKey)!==xo(u))return!1}else if(!wo(e.options.mutationKey,u))return!1}return!(i&&e.state.status!==i||a&&!a(e))}function mf(t,e){return((e==null?void 0:e.queryKeyHashFn)||xo)(t)}function xo(t){return JSON.stringify(t,(e,r)=>kd(r)?Object.keys(r).sort().reduce((i,a)=>(i[a]=r[a],i),{}):r)}function wo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>wo(t[r],e[r])):!1}var Rk=Object.prototype.hasOwnProperty;function E0(t,e,r=0){if(t===e)return t;if(r>500)return e;const i=Eg(t)&&Eg(e);if(!i&&!(kd(t)&&kd(e)))return e;const u=(i?t:Object.keys(t)).length,c=i?e:Object.keys(e),f=c.length,h=i?new Array(f):{};let m=0;for(let g=0;g{Gr.setTimeout(e,t)})}function Ed(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?E0(t,e):e}function Nk(t,e,r=0){const i=[...t,e];return r&&i.length>r?i.slice(1):i}function jk(t,e,r=0){const i=[e,...t];return r&&i.length>r?i.slice(0,-1):i}var gf=Symbol();function T0(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===gf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function C0(t,e){return typeof t=="function"?t(...e):!!t}function Ok(t,e,r){let i=!1,a;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(a??(a=e()),i||(i=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),t}var Jr,gr,Ws,Bv,Ik=(Bv=class extends jo{constructor(){super();ue(this,Jr);ue(this,gr);ue(this,Ws);X(this,Ws,e=>{if(!us&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){A(this,gr)||this.setEventListener(A(this,Ws))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,gr))==null||e.call(this),X(this,gr,void 0))}setEventListener(e){var r;X(this,Ws,e),(r=A(this,gr))==null||r.call(this),X(this,gr,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){A(this,Jr)!==e&&(X(this,Jr,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof A(this,Jr)=="boolean"?A(this,Jr):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Jr=new WeakMap,gr=new WeakMap,Ws=new WeakMap,Bv),yf=new Ik;function Td(){let t,e;const r=new Promise((a,u)=>{t=a,e=u});r.status="pending",r.catch(()=>{});function i(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{i({status:"fulfilled",value:a}),t(a)},r.reject=a=>{i({status:"rejected",reason:a}),e(a)},r}var Lk=Ak;function Dk(){let t=[],e=0,r=f=>{f()},i=f=>{f()},a=Lk;const u=f=>{e?t.push(f):a(()=>{r(f)})},c=()=>{const f=t;t=[],f.length&&a(()=>{i(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;e++;try{h=f()}finally{e--,e||c()}return h},batchCalls:f=>(...h)=>{u(()=>{f(...h)})},schedule:u,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{a=f}}}var dt=Dk(),qs,yr,Ks,Uv,Mk=(Uv=class extends jo{constructor(){super();ue(this,qs,!0);ue(this,yr);ue(this,Ks);X(this,Ks,e=>{if(!us&&window.addEventListener){const r=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}}})}onSubscribe(){A(this,yr)||this.setEventListener(A(this,Ks))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,yr))==null||e.call(this),X(this,yr,void 0))}setEventListener(e){var r;X(this,Ks,e),(r=A(this,yr))==null||r.call(this),X(this,yr,e(this.setOnline.bind(this)))}setOnline(e){A(this,qs)!==e&&(X(this,qs,e),this.listeners.forEach(i=>{i(e)}))}isOnline(){return A(this,qs)}},qs=new WeakMap,yr=new WeakMap,Ks=new WeakMap,Uv),bl=new Mk;function Fk(t){return Math.min(1e3*2**t,3e4)}function A0(t){return(t??"online")==="online"?bl.isOnline():!0}var Cd=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function P0(t){let e=!1,r=0,i;const a=Td(),u=()=>a.status!=="pending",c=k=>{var S;if(!u()){const R=new Cd(k);w(R),(S=t.onCancel)==null||S.call(t,R)}},f=()=>{e=!0},h=()=>{e=!1},m=()=>yf.isFocused()&&(t.networkMode==="always"||bl.isOnline())&&t.canRun(),g=()=>A0(t.networkMode)&&t.canRun(),v=k=>{u()||(i==null||i(),a.resolve(k))},w=k=>{u()||(i==null||i(),a.reject(k))},E=()=>new Promise(k=>{var S;i=R=>{(u()||m())&&k(R)},(S=t.onPause)==null||S.call(t)}).then(()=>{var k;i=void 0,u()||(k=t.onContinue)==null||k.call(t)}),b=()=>{if(u())return;let k;const S=r===0?t.initialPromise:void 0;try{k=S??t.fn()}catch(R){k=Promise.reject(R)}Promise.resolve(k).then(v).catch(R=>{var K;if(u())return;const V=t.retry??(us?0:3),I=t.retryDelay??Fk,O=typeof I=="function"?I(r,R):I,B=V===!0||typeof V=="number"&&rm()?void 0:E()).then(()=>{e?w(R):b()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(i==null||i(),a),cancelRetry:f,continueRetry:h,canStart:g,start:()=>(g()?b():E().then(b),a)}}var Zr,zv,R0=(zv=class{constructor(){ue(this,Zr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sd(this.gcTime)&&X(this,Zr,Gr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(us?1/0:300*1e3))}clearGcTimeout(){A(this,Zr)&&(Gr.clearTimeout(A(this,Zr)),X(this,Zr,void 0))}},Zr=new WeakMap,zv),es,Qs,Xt,ts,ot,Co,ns,un,Ln,$v,Vk=($v=class extends R0{constructor(e){super();ue(this,un);ue(this,es);ue(this,Qs);ue(this,Xt);ue(this,ts);ue(this,ot);ue(this,Co);ue(this,ns);X(this,ns,!1),X(this,Co,e.defaultOptions),this.setOptions(e.options),this.observers=[],X(this,ts,e.client),X(this,Xt,A(this,ts).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,X(this,es,Ag(this.options)),this.state=e.state??A(this,es),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=A(this,ot))==null?void 0:e.promise}setOptions(e){if(this.options={...A(this,Co),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Ag(this.options);r.data!==void 0&&(this.setState(Cg(r.data,r.dataUpdatedAt)),X(this,es,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Xt).remove(this)}setData(e,r){const i=Ed(this.state.data,e,this.options);return ke(this,un,Ln).call(this,{data:i,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),i}setState(e,r){ke(this,un,Ln).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var i,a;const r=(i=A(this,ot))==null?void 0:i.promise;return(a=A(this,ot))==null||a.cancel(e),r?r.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,es))}isActive(){return this.observers.some(e=>Jt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===gf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Er(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!k0(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=A(this,ot))==null||r.continue()}onOnline(){var r;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=A(this,ot))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,Xt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(A(this,ot)&&(A(this,ns)?A(this,ot).cancel({revert:!0}):A(this,ot).cancelRetry()),this.scheduleGc()),A(this,Xt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ke(this,un,Ln).call(this,{type:"invalidate"})}async fetch(e,r){var h,m,g,v,w,E,b,k,S,R,V,I;if(this.state.fetchStatus!=="idle"&&((h=A(this,ot))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(A(this,ot))return A(this,ot).continueRetry(),A(this,ot).promise}if(e&&this.setOptions(e),!this.options.queryFn){const O=this.observers.find(B=>B.options.queryFn);O&&this.setOptions(O.options)}const i=new AbortController,a=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(X(this,ns,!0),i.signal)})},u=()=>{const O=T0(this.options,r),K=(()=>{const G={client:A(this,ts),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return X(this,ns,!1),this.options.persister?this.options.persister(O,K,this):O(K)},f=(()=>{const O={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:A(this,ts),state:this.state,fetchFn:u};return a(O),O})();(m=this.options.behavior)==null||m.onFetch(f,this),X(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=f.fetchOptions)==null?void 0:g.meta))&&ke(this,un,Ln).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta}),X(this,ot,P0({initialPromise:r==null?void 0:r.initialPromise,fn:f.fetchFn,onCancel:O=>{O instanceof Cd&&O.revert&&this.setState({...A(this,Qs),fetchStatus:"idle"}),i.abort()},onFail:(O,B)=>{ke(this,un,Ln).call(this,{type:"failed",failureCount:O,error:B})},onPause:()=>{ke(this,un,Ln).call(this,{type:"pause"})},onContinue:()=>{ke(this,un,Ln).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const O=await A(this,ot).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(E=(w=A(this,Xt).config).onSuccess)==null||E.call(w,O,this),(k=(b=A(this,Xt).config).onSettled)==null||k.call(b,O,this.state.error,this),O}catch(O){if(O instanceof Cd){if(O.silent)return A(this,ot).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw ke(this,un,Ln).call(this,{type:"error",error:O}),(R=(S=A(this,Xt).config).onError)==null||R.call(S,O,this),(I=(V=A(this,Xt).config).onSettled)==null||I.call(V,this.state.data,O,this),O}finally{this.scheduleGc()}}},es=new WeakMap,Qs=new WeakMap,Xt=new WeakMap,ts=new WeakMap,ot=new WeakMap,Co=new WeakMap,ns=new WeakMap,un=new WeakSet,Ln=function(e){const r=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,..._0(i.data,this.options),fetchMeta:e.meta??null};case"success":const a={...i,...Cg(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,Qs,e.manual?a:void 0),a;case"error":const u=e.error;return{...i,error:u,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=r(this.state),dt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),A(this,Xt).notify({query:this,type:"updated",action:e})})},$v);function _0(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A0(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Cg(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ag(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,i=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Nt,Ee,Ao,kt,rs,Gs,Dn,vr,Po,Ys,Xs,ss,is,xr,Js,je,so,Ad,Pd,Rd,_d,Nd,jd,Od,N0,Hv,Bk=(Hv=class extends jo{constructor(e,r){super();ue(this,je);ue(this,Nt);ue(this,Ee);ue(this,Ao);ue(this,kt);ue(this,rs);ue(this,Gs);ue(this,Dn);ue(this,vr);ue(this,Po);ue(this,Ys);ue(this,Xs);ue(this,ss);ue(this,is);ue(this,xr);ue(this,Js,new Set);this.options=r,X(this,Nt,e),X(this,vr,null),X(this,Dn,Td()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(A(this,Ee).addObserver(this),Pg(A(this,Ee),this.options)?ke(this,je,so).call(this):this.updateResult(),ke(this,je,_d).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Id(A(this,Ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Id(A(this,Ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ke(this,je,Nd).call(this),ke(this,je,jd).call(this),A(this,Ee).removeObserver(this)}setOptions(e){const r=this.options,i=A(this,Ee);if(this.options=A(this,Nt).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Jt(this.options.enabled,A(this,Ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ke(this,je,Od).call(this),A(this,Ee).setOptions(this.options),r._defaulted&&!bd(this.options,r)&&A(this,Nt).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,Ee),observer:this});const a=this.hasListeners();a&&Rg(A(this,Ee),i,this.options,r)&&ke(this,je,so).call(this),this.updateResult(),a&&(A(this,Ee)!==i||Jt(this.options.enabled,A(this,Ee))!==Jt(r.enabled,A(this,Ee))||Er(this.options.staleTime,A(this,Ee))!==Er(r.staleTime,A(this,Ee)))&&ke(this,je,Ad).call(this);const u=ke(this,je,Pd).call(this);a&&(A(this,Ee)!==i||Jt(this.options.enabled,A(this,Ee))!==Jt(r.enabled,A(this,Ee))||u!==A(this,xr))&&ke(this,je,Rd).call(this,u)}getOptimisticResult(e){const r=A(this,Nt).getQueryCache().build(A(this,Nt),e),i=this.createResult(r,e);return zk(this,i)&&(X(this,kt,i),X(this,Gs,this.options),X(this,rs,A(this,Ee).state)),i}getCurrentResult(){return A(this,kt)}trackResult(e,r){return new Proxy(e,{get:(i,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&A(this,Dn).status==="pending"&&A(this,Dn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,a))})}trackProp(e){A(this,Js).add(e)}getCurrentQuery(){return A(this,Ee)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=A(this,Nt).defaultQueryOptions(e),i=A(this,Nt).getQueryCache().build(A(this,Nt),r);return i.fetch().then(()=>this.createResult(i,r))}fetch(e){return ke(this,je,so).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,kt)))}createResult(e,r){var J;const i=A(this,Ee),a=this.options,u=A(this,kt),c=A(this,rs),f=A(this,Gs),m=e!==i?e.state:A(this,Ao),{state:g}=e;let v={...g},w=!1,E;if(r._optimisticResults){const de=this.hasListeners(),me=!de&&Pg(e,r),Re=de&&Rg(e,i,r,a);(me||Re)&&(v={...v,..._0(g.data,e.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:b,errorUpdatedAt:k,status:S}=v;E=v.data;let R=!1;if(r.placeholderData!==void 0&&E===void 0&&S==="pending"){let de;u!=null&&u.isPlaceholderData&&r.placeholderData===(f==null?void 0:f.placeholderData)?(de=u.data,R=!0):de=typeof r.placeholderData=="function"?r.placeholderData((J=A(this,Xs))==null?void 0:J.state.data,A(this,Xs)):r.placeholderData,de!==void 0&&(S="success",E=Ed(u==null?void 0:u.data,de,r),w=!0)}if(r.select&&E!==void 0&&!R)if(u&&E===(c==null?void 0:c.data)&&r.select===A(this,Po))E=A(this,Ys);else try{X(this,Po,r.select),E=r.select(E),E=Ed(u==null?void 0:u.data,E,r),X(this,Ys,E),X(this,vr,null)}catch(de){X(this,vr,de)}A(this,vr)&&(b=A(this,vr),E=A(this,Ys),k=Date.now(),S="error");const V=v.fetchStatus==="fetching",I=S==="pending",O=S==="error",B=I&&V,K=E!==void 0,L={status:S,fetchStatus:v.fetchStatus,isPending:I,isSuccess:S==="success",isError:O,isInitialLoading:B,isLoading:B,data:E,dataUpdatedAt:v.dataUpdatedAt,error:b,errorUpdatedAt:k,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:V,isRefetching:V&&!I,isLoadingError:O&&!K,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:O&&K,isStale:vf(e,r),refetch:this.refetch,promise:A(this,Dn),isEnabled:Jt(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const de=L.data!==void 0,me=L.status==="error"&&!de,Re=De=>{me?De.reject(L.error):de&&De.resolve(L.data)},Ie=()=>{const De=X(this,Dn,L.promise=Td());Re(De)},_e=A(this,Dn);switch(_e.status){case"pending":e.queryHash===i.queryHash&&Re(_e);break;case"fulfilled":(me||L.data!==_e.value)&&Ie();break;case"rejected":(!me||L.error!==_e.reason)&&Ie();break}}return L}updateResult(){const e=A(this,kt),r=this.createResult(A(this,Ee),this.options);if(X(this,rs,A(this,Ee).state),X(this,Gs,this.options),A(this,rs).data!==void 0&&X(this,Xs,A(this,Ee)),bd(r,e))return;X(this,kt,r);const i=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!A(this,Js).size)return!0;const c=new Set(u??A(this,Js));return this.options.throwOnError&&c.add("error"),Object.keys(A(this,kt)).some(f=>{const h=f;return A(this,kt)[h]!==e[h]&&c.has(h)})};ke(this,je,N0).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ke(this,je,_d).call(this)}},Nt=new WeakMap,Ee=new WeakMap,Ao=new WeakMap,kt=new WeakMap,rs=new WeakMap,Gs=new WeakMap,Dn=new WeakMap,vr=new WeakMap,Po=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,ss=new WeakMap,is=new WeakMap,xr=new WeakMap,Js=new WeakMap,je=new WeakSet,so=function(e){ke(this,je,Od).call(this);let r=A(this,Ee).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(jt)),r},Ad=function(){ke(this,je,Nd).call(this);const e=Er(this.options.staleTime,A(this,Ee));if(us||A(this,kt).isStale||!Sd(e))return;const i=k0(A(this,kt).dataUpdatedAt,e)+1;X(this,ss,Gr.setTimeout(()=>{A(this,kt).isStale||this.updateResult()},i))},Pd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,Ee)):this.options.refetchInterval)??!1},Rd=function(e){ke(this,je,jd).call(this),X(this,xr,e),!(us||Jt(this.options.enabled,A(this,Ee))===!1||!Sd(A(this,xr))||A(this,xr)===0)&&X(this,is,Gr.setInterval(()=>{(this.options.refetchIntervalInBackground||yf.isFocused())&&ke(this,je,so).call(this)},A(this,xr)))},_d=function(){ke(this,je,Ad).call(this),ke(this,je,Rd).call(this,ke(this,je,Pd).call(this))},Nd=function(){A(this,ss)&&(Gr.clearTimeout(A(this,ss)),X(this,ss,void 0))},jd=function(){A(this,is)&&(Gr.clearInterval(A(this,is)),X(this,is,void 0))},Od=function(){const e=A(this,Nt).getQueryCache().build(A(this,Nt),this.options);if(e===A(this,Ee))return;const r=A(this,Ee);X(this,Ee,e),X(this,Ao,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},N0=function(e){dt.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(A(this,kt))}),A(this,Nt).getQueryCache().notify({query:A(this,Ee),type:"observerResultsUpdated"})})},Hv);function Uk(t,e){return Jt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Pg(t,e){return Uk(t,e)||t.state.data!==void 0&&Id(t,e,e.refetchOnMount)}function Id(t,e,r){if(Jt(e.enabled,t)!==!1&&Er(e.staleTime,t)!=="static"){const i=typeof r=="function"?r(t):r;return i==="always"||i!==!1&&vf(t,e)}return!1}function Rg(t,e,r,i){return(t!==e||Jt(i.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&vf(t,r)}function vf(t,e){return Jt(e.enabled,t)!==!1&&t.isStaleByTime(Er(e.staleTime,t))}function zk(t,e){return!bd(t.getCurrentResult(),e)}function _g(t){return{onFetch:(e,r)=>{var g,v,w,E,b;const i=e.options,a=(w=(v=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:w.direction,u=((E=e.state.data)==null?void 0:E.pages)||[],c=((b=e.state.data)==null?void 0:b.pageParams)||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let k=!1;const S=I=>{Ok(I,()=>e.signal,()=>k=!0)},R=T0(e.options,e.fetchOptions),V=async(I,O,B)=>{if(k)return Promise.reject();if(O==null&&I.pages.length)return Promise.resolve(I);const G=(()=>{const me={client:e.client,queryKey:e.queryKey,pageParam:O,direction:B?"backward":"forward",meta:e.options.meta};return S(me),me})(),L=await R(G),{maxPages:J}=e.options,de=B?jk:Nk;return{pages:de(I.pages,L,J),pageParams:de(I.pageParams,O,J)}};if(a&&u.length){const I=a==="backward",O=I?$k:Ng,B={pages:u,pageParams:c},K=O(i,B);f=await V(B,K,I)}else{const I=t??u.length;do{const O=h===0?c[0]??i.initialPageParam:Ng(i,f);if(h>0&&O==null)break;f=await V(f,O),h++}while(h{var k,S;return(S=(k=e.options).persister)==null?void 0:S.call(k,m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=m}}}function Ng(t,{pages:e,pageParams:r}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,r[i],r):void 0}function $k(t,{pages:e,pageParams:r}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,r[0],r):void 0}var Ro,vn,yt,os,xn,hr,Wv,Hk=(Wv=class extends R0{constructor(e){super();ue(this,xn);ue(this,Ro);ue(this,vn);ue(this,yt);ue(this,os);X(this,Ro,e.client),this.mutationId=e.mutationId,X(this,yt,e.mutationCache),X(this,vn,[]),this.state=e.state||Wk(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,vn).includes(e)||(A(this,vn).push(e),this.clearGcTimeout(),A(this,yt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){X(this,vn,A(this,vn).filter(r=>r!==e)),this.scheduleGc(),A(this,yt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,vn).length||(this.state.status==="pending"?this.scheduleGc():A(this,yt).remove(this))}continue(){var e;return((e=A(this,os))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,f,h,m,g,v,w,E,b,k,S,R,V,I,O,B,K,G;const r=()=>{ke(this,xn,hr).call(this,{type:"continue"})},i={client:A(this,Ro),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,os,P0({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(L,J)=>{ke(this,xn,hr).call(this,{type:"failed",failureCount:L,error:J})},onPause:()=>{ke(this,xn,hr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,yt).canRun(this)}));const a=this.state.status==="pending",u=!A(this,os).canStart();try{if(a)r();else{ke(this,xn,hr).call(this,{type:"pending",variables:e,isPaused:u}),A(this,yt).config.onMutate&&await A(this,yt).config.onMutate(e,this,i);const J=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,e,i));J!==this.state.context&&ke(this,xn,hr).call(this,{type:"pending",context:J,variables:e,isPaused:u})}const L=await A(this,os).start();return await((m=(h=A(this,yt).config).onSuccess)==null?void 0:m.call(h,L,e,this.state.context,this,i)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,L,e,this.state.context,i)),await((E=(w=A(this,yt).config).onSettled)==null?void 0:E.call(w,L,null,this.state.variables,this.state.context,this,i)),await((k=(b=this.options).onSettled)==null?void 0:k.call(b,L,null,e,this.state.context,i)),ke(this,xn,hr).call(this,{type:"success",data:L}),L}catch(L){try{await((R=(S=A(this,yt).config).onError)==null?void 0:R.call(S,L,e,this.state.context,this,i))}catch(J){Promise.reject(J)}try{await((I=(V=this.options).onError)==null?void 0:I.call(V,L,e,this.state.context,i))}catch(J){Promise.reject(J)}try{await((B=(O=A(this,yt).config).onSettled)==null?void 0:B.call(O,void 0,L,this.state.variables,this.state.context,this,i))}catch(J){Promise.reject(J)}try{await((G=(K=this.options).onSettled)==null?void 0:G.call(K,void 0,L,e,this.state.context,i))}catch(J){Promise.reject(J)}throw ke(this,xn,hr).call(this,{type:"error",error:L}),L}finally{A(this,yt).runNext(this)}}},Ro=new WeakMap,vn=new WeakMap,yt=new WeakMap,os=new WeakMap,xn=new WeakSet,hr=function(e){const r=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),dt.batch(()=>{A(this,vn).forEach(i=>{i.onMutationUpdate(e)}),A(this,yt).notify({mutation:this,type:"updated",action:e})})},Wv);function Wk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mn,cn,_o,qv,qk=(qv=class extends jo{constructor(e={}){super();ue(this,Mn);ue(this,cn);ue(this,_o);this.config=e,X(this,Mn,new Set),X(this,cn,new Map),X(this,_o,0)}build(e,r,i){const a=new Hk({client:e,mutationCache:this,mutationId:++Ya(this,_o)._,options:e.defaultMutationOptions(r),state:i});return this.add(a),a}add(e){A(this,Mn).add(e);const r=el(e);if(typeof r=="string"){const i=A(this,cn).get(r);i?i.push(e):A(this,cn).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(A(this,Mn).delete(e)){const r=el(e);if(typeof r=="string"){const i=A(this,cn).get(r);if(i)if(i.length>1){const a=i.indexOf(e);a!==-1&&i.splice(a,1)}else i[0]===e&&A(this,cn).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=el(e);if(typeof r=="string"){const i=A(this,cn).get(r),a=i==null?void 0:i.find(u=>u.state.status==="pending");return!a||a===e}else return!0}runNext(e){var i;const r=el(e);if(typeof r=="string"){const a=(i=A(this,cn).get(r))==null?void 0:i.find(u=>u!==e&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{A(this,Mn).forEach(e=>{this.notify({type:"removed",mutation:e})}),A(this,Mn).clear(),A(this,cn).clear()})}getAll(){return Array.from(A(this,Mn))}find(e){const r={exact:!0,...e};return this.getAll().find(i=>kg(r,i))}findAll(e={}){return this.getAll().filter(r=>kg(e,r))}notify(e){dt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return dt.batch(()=>Promise.all(e.map(r=>r.continue().catch(jt))))}},Mn=new WeakMap,cn=new WeakMap,_o=new WeakMap,qv);function el(t){var e;return(e=t.options.scope)==null?void 0:e.id}var wn,Kv,Kk=(Kv=class extends jo{constructor(e={}){super();ue(this,wn);this.config=e,X(this,wn,new Map)}build(e,r,i){const a=r.queryKey,u=r.queryHash??mf(a,r);let c=this.get(u);return c||(c=new Vk({client:e,queryKey:a,queryHash:u,options:e.defaultQueryOptions(r),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){A(this,wn).has(e.queryHash)||(A(this,wn).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=A(this,wn).get(e.queryHash);r&&(e.destroy(),r===e&&A(this,wn).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){dt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,wn).get(e)}getAll(){return[...A(this,wn).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(i=>bg(r,i))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(i=>bg(e,i)):r}notify(e){dt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},wn=new WeakMap,Kv),qe,wr,Sr,Zs,ei,br,ti,ni,Qv,Qk=(Qv=class{constructor(t={}){ue(this,qe);ue(this,wr);ue(this,Sr);ue(this,Zs);ue(this,ei);ue(this,br);ue(this,ti);ue(this,ni);X(this,qe,t.queryCache||new Kk),X(this,wr,t.mutationCache||new qk),X(this,Sr,t.defaultOptions||{}),X(this,Zs,new Map),X(this,ei,new Map),X(this,br,0)}mount(){Ya(this,br)._++,A(this,br)===1&&(X(this,ti,yf.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,qe).onFocus())})),X(this,ni,bl.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,qe).onOnline())})))}unmount(){var t,e;Ya(this,br)._--,A(this,br)===0&&((t=A(this,ti))==null||t.call(this),X(this,ti,void 0),(e=A(this,ni))==null||e.call(this),X(this,ni,void 0))}isFetching(t){return A(this,qe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return A(this,wr).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=A(this,qe).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=A(this,qe).build(this,e),i=r.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Er(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return A(this,qe).findAll(t).map(({queryKey:e,state:r})=>{const i=r.data;return[e,i]})}setQueryData(t,e,r){const i=this.defaultQueryOptions({queryKey:t}),a=A(this,qe).get(i.queryHash),u=a==null?void 0:a.state.data,c=Pk(e,u);if(c!==void 0)return A(this,qe).build(this,i).setData(c,{...r,manual:!0})}setQueriesData(t,e,r){return dt.batch(()=>A(this,qe).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=A(this,qe).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=A(this,qe);dt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=A(this,qe);return dt.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},i=dt.batch(()=>A(this,qe).findAll(t).map(a=>a.cancel(r)));return Promise.all(i).then(jt).catch(jt)}invalidateQueries(t,e={}){return dt.batch(()=>(A(this,qe).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},i=dt.batch(()=>A(this,qe).findAll(t).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,r);return r.throwOnError||(u=u.catch(jt)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(jt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=A(this,qe).build(this,e);return r.isStaleByTime(Er(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(jt).catch(jt)}fetchInfiniteQuery(t){return t.behavior=_g(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(jt).catch(jt)}ensureInfiniteQueryData(t){return t.behavior=_g(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return bl.isOnline()?A(this,wr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,qe)}getMutationCache(){return A(this,wr)}getDefaultOptions(){return A(this,Sr)}setDefaultOptions(t){X(this,Sr,t)}setQueryDefaults(t,e){A(this,Zs).set(xo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...A(this,Zs).values()],r={};return e.forEach(i=>{wo(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,e){A(this,ei).set(xo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...A(this,ei).values()],r={};return e.forEach(i=>{wo(t,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...A(this,Sr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=mf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===gf&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...A(this,Sr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){A(this,qe).clear(),A(this,wr).clear()}},qe=new WeakMap,wr=new WeakMap,Sr=new WeakMap,Zs=new WeakMap,ei=new WeakMap,br=new WeakMap,ti=new WeakMap,ni=new WeakMap,Qv),j0=M.createContext(void 0),Gk=t=>{const e=M.useContext(j0);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Yk=({client:t,children:e})=>(M.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),y.jsx(j0.Provider,{value:t,children:e})),O0=M.createContext(!1),Xk=()=>M.useContext(O0);O0.Provider;function Jk(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Zk=M.createContext(Jk()),eE=()=>M.useContext(Zk),tE=(t,e,r)=>{const i=r!=null&&r.state.error&&typeof t.throwOnError=="function"?C0(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},nE=t=>{M.useEffect(()=>{t.clearReset()},[t])},rE=({result:t,errorResetBoundary:e,throwOnError:r,query:i,suspense:a})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(a&&t.data===void 0||C0(r,[t.error,i])),sE=t=>{if(t.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...a)=>r(i(...a)):r(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},iE=(t,e)=>t.isLoading&&t.isFetching&&!e,oE=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,jg=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function aE(t,e,r){var w,E,b,k;const i=Xk(),a=eE(),u=Gk(),c=u.defaultQueryOptions(t);(E=(w=u.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||E.call(w,c);const f=u.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",sE(c),tE(c,a,f),nE(a);const h=!u.getQueryCache().get(c.queryHash),[m]=M.useState(()=>new e(u,c)),g=m.getOptimisticResult(c),v=!i&&t.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(S=>{const R=v?m.subscribe(dt.batchCalls(S)):jt;return m.updateResult(),R},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),M.useEffect(()=>{m.setOptions(c)},[c,m]),oE(c,g))throw jg(c,m,a);if(rE({result:g,errorResetBoundary:a,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw g.error;if((k=(b=u.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||k.call(b,c,g),c.experimental_prefetchInRender&&!us&&iE(g,i)){const S=h?jg(c,m,a):f==null?void 0:f.promise;S==null||S.catch(jt).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?g:m.trackResult(g)}function lE(t,e){return aE(t,Bk)}const uE=new Qk({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});Yv();/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function kl(){return kl=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function I0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function dE(){return Math.random().toString(36).substr(2,8)}function Ig(t,e){return{usr:t.state,key:t.key,idx:e}}function Ld(t,e,r,i){return r===void 0&&(r=null),kl({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Il(e):e,{state:r,key:e&&e.key||i||dE()})}function L0(t){let{pathname:e="/",search:r="",hash:i=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Il(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function fE(t,e,r,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:u=!1}=i,c=a.history,f=kr.Pop,h=null,m=g();m==null&&(m=0,c.replaceState(kl({},c.state,{idx:m}),""));function g(){return(c.state||{idx:null}).idx}function v(){f=kr.Pop;let S=g(),R=S==null?null:S-m;m=S,h&&h({action:f,location:k.location,delta:R})}function w(S,R){f=kr.Push;let V=Ld(k.location,S,R);m=g()+1;let I=Ig(V,m),O=k.createHref(V);try{c.pushState(I,"",O)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;a.location.assign(O)}u&&h&&h({action:f,location:k.location,delta:1})}function E(S,R){f=kr.Replace;let V=Ld(k.location,S,R);m=g();let I=Ig(V,m),O=k.createHref(V);c.replaceState(I,"",O),u&&h&&h({action:f,location:k.location,delta:0})}function b(S){let R=a.location.origin!=="null"?a.location.origin:a.location.href,V=typeof S=="string"?S:L0(S);return V=V.replace(/ $/,"%20"),Lt(R,"No window.location.(origin|href) available to create URL for href: "+V),new URL(V,R)}let k={get action(){return f},get location(){return t(a,c)},listen(S){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(Og,v),h=S,()=>{a.removeEventListener(Og,v),h=null}},createHref(S){return e(a,S)},createURL:b,encodeLocation(S){let R=b(S);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:w,replace:E,go(S){return c.go(S)}};return k}var Lg;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Lg||(Lg={}));function hE(t,e,r){return r===void 0&&(r="/"),pE(t,e,r)}function pE(t,e,r,i){let a=typeof e=="string"?Il(e):e,u=F0(a.pathname||"/",r);if(u==null)return null;let c=D0(t);mE(c);let f=null;for(let h=0;f==null&&h{let h={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};h.relativePath.startsWith("/")&&(Lt(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let m=Hs([i,h.relativePath]),g=r.concat(h);u.children&&u.children.length>0&&(Lt(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),D0(u.children,e,g,m)),!(u.path==null&&!u.index)&&e.push({path:m,score:bE(m,u.index),routesMeta:g})};return t.forEach((u,c)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))a(u,c);else for(let h of M0(u.path))a(u,c,h)}),e}function M0(t){let e=t.split("/");if(e.length===0)return[];let[r,...i]=e,a=r.endsWith("?"),u=r.replace(/\?$/,"");if(i.length===0)return a?[u,""]:[u];let c=M0(i.join("/")),f=[];return f.push(...c.map(h=>h===""?u:[u,h].join("/"))),a&&f.push(...c),f.map(h=>t.startsWith("/")&&h===""?"/":h)}function mE(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:kE(e.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const gE=/^:[\w-]+$/,yE=3,vE=2,xE=1,wE=10,SE=-2,Dg=t=>t==="*";function bE(t,e){let r=t.split("/"),i=r.length;return r.some(Dg)&&(i+=SE),e&&(i+=vE),r.filter(a=>!Dg(a)).reduce((a,u)=>a+(gE.test(u)?yE:u===""?xE:wE),i)}function kE(t,e){return t.length===e.length&&t.slice(0,-1).every((i,a)=>i===e[a])?t[t.length-1]-e[e.length-1]:0}function EE(t,e,r){let{routesMeta:i}=t,a={},u="/",c=[];for(let f=0;f{let{paramName:w,isOptional:E}=g;if(w==="*"){let k=f[v]||"";c=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const b=f[v];return E&&!b?m[w]=void 0:m[w]=(b||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:c,pattern:t}}function CE(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),I0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),i]}function AE(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return I0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function F0(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,i=t.charAt(r);return i&&i!=="/"?null:t.slice(r)||"/"}const Hs=t=>t.join("/").replace(/\/\/+/g,"/"),PE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/");function RE(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const V0=["post","put","patch","delete"];new Set(V0);const _E=["get",...V0];new Set(_E);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function El(){return El=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},S,{params:Object.assign({},f,S.params),pathname:Hs([h,a.encodeLocation?a.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:Hs([h,a.encodeLocation?a.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),u,r,i);return e&&k?M.createElement(Ll.Provider,{value:{location:El({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:kr.Pop}},k):k}function LE(){let t=$E(),e=RE(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},e),r?M.createElement("pre",{style:a},r):null,null)}const DE=M.createElement(LE,null);class ME extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?M.createElement(Dl.Provider,{value:this.props.routeContext},M.createElement(U0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function FE(t){let{routeContext:e,match:r,children:i}=t,a=M.useContext(NE);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),M.createElement(Dl.Provider,{value:e},i)}function VE(t,e,r,i){var a;if(e===void 0&&(e=[]),r===void 0&&(r=null),i===void 0&&(i=null),t==null){var u;if(!r)return null;if(r.errors)t=r.matches;else if((u=i)!=null&&u.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let c=t,f=(a=r)==null?void 0:a.errors;if(f!=null){let g=c.findIndex(v=>v.route.id&&(f==null?void 0:f[v.route.id])!==void 0);g>=0||Lt(!1),c=c.slice(0,Math.min(c.length,g+1))}let h=!1,m=-1;if(r&&i&&i.v7_partialHydration)for(let g=0;g=0?c=c.slice(0,m+1):c=[c[0]];break}}}return c.reduceRight((g,v,w)=>{let E,b=!1,k=null,S=null;r&&(E=f&&v.route.id?f[v.route.id]:void 0,k=v.route.errorElement||DE,h&&(m<0&&w===0?(HE("route-fallback"),b=!0,S=null):m===w&&(b=!0,S=v.route.hydrateFallbackElement||null)));let R=e.concat(c.slice(0,w+1)),V=()=>{let I;return E?I=k:b?I=S:v.route.Component?I=M.createElement(v.route.Component,null):v.route.element?I=v.route.element:I=g,M.createElement(FE,{match:v,routeContext:{outlet:g,matches:R,isDataRoute:r!=null},children:I})};return r&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?M.createElement(ME,{location:r.location,revalidation:r.revalidation,component:k,error:E,children:V(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):V()},null)}var $0=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})($0||{});function BE(t){let e=M.useContext(jE);return e||Lt(!1),e}function UE(t){let e=M.useContext(Dl);return e||Lt(!1),e}function zE(t){let e=UE(),r=e.matches[e.matches.length-1];return r.route.id||Lt(!1),r.route.id}function $E(){var t;let e=M.useContext(U0),r=BE($0.UseRouteError),i=zE();return e!==void 0?e:(t=r.errors)==null?void 0:t[i]}const Mg={};function HE(t,e,r){Mg[t]||(Mg[t]=!0)}function WE(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Dd(t){Lt(!1)}function qE(t){let{basename:e="/",children:r=null,location:i,navigationType:a=kr.Pop,navigator:u,static:c=!1,future:f}=t;xf()&&Lt(!1);let h=e.replace(/^\/*/,"/"),m=M.useMemo(()=>({basename:h,navigator:u,static:c,future:El({v7_relativeSplatPath:!1},f)}),[h,f,u,c]);typeof i=="string"&&(i=Il(i));let{pathname:g="/",search:v="",hash:w="",state:E=null,key:b="default"}=i,k=M.useMemo(()=>{let S=F0(g,h);return S==null?null:{location:{pathname:S,search:v,hash:w,state:E,key:b},navigationType:a}},[h,g,v,w,E,b,a]);return k==null?null:M.createElement(B0.Provider,{value:m},M.createElement(Ll.Provider,{children:r,value:k}))}function KE(t){let{children:e,location:r}=t;return OE(Md(e),r)}new Promise(()=>{});function Md(t,e){e===void 0&&(e=[]);let r=[];return M.Children.forEach(t,(i,a)=>{if(!M.isValidElement(i))return;let u=[...e,a];if(i.type===M.Fragment){r.push.apply(r,Md(i.props.children,u));return}i.type!==Dd&&Lt(!1),!i.props.index||!i.props.children||Lt(!1);let c={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=Md(i.props.children,u)),r.push(c)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const QE="6";try{window.__reactRouterVersion=QE}catch{}const GE="startTransition",Fg=rb[GE];function YE(t){let{basename:e,children:r,future:i,window:a}=t,u=M.useRef();u.current==null&&(u.current=cE({window:a,v5Compat:!0}));let c=u.current,[f,h]=M.useState({action:c.action,location:c.location}),{v7_startTransition:m}=i||{},g=M.useCallback(v=>{m&&Fg?Fg(()=>h(v)):h(v)},[h,m]);return M.useLayoutEffect(()=>c.listen(g),[c,g]),M.useEffect(()=>WE(i),[i]),M.createElement(qE,{basename:e,children:r,location:f.location,navigationType:f.action,navigator:c,future:i})}var Vg;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Vg||(Vg={}));var Bg;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Bg||(Bg={}));function H0(t,e){return function(){return t.apply(e,arguments)}}const{toString:XE}=Object.prototype,{getPrototypeOf:wf}=Object,{iterator:Ml,toStringTag:W0}=Symbol,Fl=(t=>e=>{const r=XE.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),fn=t=>(t=t.toLowerCase(),e=>Fl(e)===t),Vl=t=>e=>typeof e===t,{isArray:ai}=Array,ri=Vl("undefined");function Oo(t){return t!==null&&!ri(t)&&t.constructor!==null&&!ri(t.constructor)&&Ot(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const q0=fn("ArrayBuffer");function JE(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&q0(t.buffer),e}const ZE=Vl("string"),Ot=Vl("function"),K0=Vl("number"),Io=t=>t!==null&&typeof t=="object",eT=t=>t===!0||t===!1,dl=t=>{if(Fl(t)!=="object")return!1;const e=wf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(W0 in t)&&!(Ml in t)},tT=t=>{if(!Io(t)||Oo(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},nT=fn("Date"),rT=fn("File"),sT=fn("Blob"),iT=fn("FileList"),oT=t=>Io(t)&&Ot(t.pipe),aT=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ot(t.append)&&((e=Fl(t))==="formdata"||e==="object"&&Ot(t.toString)&&t.toString()==="[object FormData]"))},lT=fn("URLSearchParams"),[uT,cT,dT,fT]=["ReadableStream","Request","Response","Headers"].map(fn),hT=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lo(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let i,a;if(typeof t!="object"&&(t=[t]),ai(t))for(i=0,a=t.length;i0;)if(a=r[i],e===a.toLowerCase())return a;return null}const Yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,G0=t=>!ri(t)&&t!==Yr;function Fd(){const{caseless:t,skipUndefined:e}=G0(this)&&this||{},r={},i=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&Q0(r,u)||u;dl(r[c])&&dl(a)?r[c]=Fd(r[c],a):dl(a)?r[c]=Fd({},a):ai(a)?r[c]=a.slice():(!e||!ri(a))&&(r[c]=a)};for(let a=0,u=arguments.length;a(Lo(e,(a,u)=>{r&&Ot(a)?Object.defineProperty(t,u,{value:H0(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,u,{value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),t),mT=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),gT=(t,e,r,i)=>{t.prototype=Object.create(e.prototype,i),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},yT=(t,e,r,i)=>{let a,u,c;const f={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),u=a.length;u-- >0;)c=a[u],(!i||i(c,t,e))&&!f[c]&&(e[c]=t[c],f[c]=!0);t=r!==!1&&wf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},vT=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const i=t.indexOf(e,r);return i!==-1&&i===r},xT=t=>{if(!t)return null;if(ai(t))return t;let e=t.length;if(!K0(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},wT=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&wf(Uint8Array)),ST=(t,e)=>{const i=(t&&t[Ml]).call(t);let a;for(;(a=i.next())&&!a.done;){const u=a.value;e.call(t,u[0],u[1])}},bT=(t,e)=>{let r;const i=[];for(;(r=t.exec(e))!==null;)i.push(r);return i},kT=fn("HTMLFormElement"),ET=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,a){return i.toUpperCase()+a}),Ug=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),TT=fn("RegExp"),Y0=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),i={};Lo(r,(a,u)=>{let c;(c=e(a,u,t))!==!1&&(i[u]=c||a)}),Object.defineProperties(t,i)},CT=t=>{Y0(t,(e,r)=>{if(Ot(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=t[r];if(Ot(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},AT=(t,e)=>{const r={},i=a=>{a.forEach(u=>{r[u]=!0})};return ai(t)?i(t):i(String(t).split(e)),r},PT=()=>{},RT=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function _T(t){return!!(t&&Ot(t.append)&&t[W0]==="FormData"&&t[Ml])}const NT=t=>{const e=new Array(10),r=(i,a)=>{if(Io(i)){if(e.indexOf(i)>=0)return;if(Oo(i))return i;if(!("toJSON"in i)){e[a]=i;const u=ai(i)?[]:{};return Lo(i,(c,f)=>{const h=r(c,a+1);!ri(h)&&(u[f]=h)}),e[a]=void 0,u}}return i};return r(t,0)},jT=fn("AsyncFunction"),OT=t=>t&&(Io(t)||Ot(t))&&Ot(t.then)&&Ot(t.catch),X0=((t,e)=>t?setImmediate:e?((r,i)=>(Yr.addEventListener("message",({source:a,data:u})=>{a===Yr&&u===r&&i.length&&i.shift()()},!1),a=>{i.push(a),Yr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ot(Yr.postMessage)),IT=typeof queueMicrotask<"u"?queueMicrotask.bind(Yr):typeof process<"u"&&process.nextTick||X0,LT=t=>t!=null&&Ot(t[Ml]),F={isArray:ai,isArrayBuffer:q0,isBuffer:Oo,isFormData:aT,isArrayBufferView:JE,isString:ZE,isNumber:K0,isBoolean:eT,isObject:Io,isPlainObject:dl,isEmptyObject:tT,isReadableStream:uT,isRequest:cT,isResponse:dT,isHeaders:fT,isUndefined:ri,isDate:nT,isFile:rT,isBlob:sT,isRegExp:TT,isFunction:Ot,isStream:oT,isURLSearchParams:lT,isTypedArray:wT,isFileList:iT,forEach:Lo,merge:Fd,extend:pT,trim:hT,stripBOM:mT,inherits:gT,toFlatObject:yT,kindOf:Fl,kindOfTest:fn,endsWith:vT,toArray:xT,forEachEntry:ST,matchAll:bT,isHTMLForm:kT,hasOwnProperty:Ug,hasOwnProp:Ug,reduceDescriptors:Y0,freezeMethods:CT,toObjectSet:AT,toCamelCase:ET,noop:PT,toFiniteNumber:RT,findKey:Q0,global:Yr,isContextDefined:G0,isSpecCompliantForm:_T,toJSONObject:NT,isAsyncFn:jT,isThenable:OT,setImmediate:X0,asap:IT,isIterable:LT};let pe=class J0 extends Error{static from(e,r,i,a,u,c){const f=new J0(e.message,r||e.code,i,a,u);return f.cause=e,f.name=e.name,c&&Object.assign(f,c),f}constructor(e,r,i,a,u){super(e),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),i&&(this.config=i),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}};pe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pe.ERR_BAD_OPTION="ERR_BAD_OPTION";pe.ECONNABORTED="ECONNABORTED";pe.ETIMEDOUT="ETIMEDOUT";pe.ERR_NETWORK="ERR_NETWORK";pe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pe.ERR_DEPRECATED="ERR_DEPRECATED";pe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pe.ERR_CANCELED="ERR_CANCELED";pe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pe.ERR_INVALID_URL="ERR_INVALID_URL";const DT=null;function Vd(t){return F.isPlainObject(t)||F.isArray(t)}function Z0(t){return F.endsWith(t,"[]")?t.slice(0,-2):t}function zg(t,e,r){return t?t.concat(e).map(function(a,u){return a=Z0(a),!r&&u?"["+a+"]":a}).join(r?".":""):e}function MT(t){return F.isArray(t)&&!t.some(Vd)}const FT=F.toFlatObject(F,{},null,function(e){return/^is[A-Z]/.test(e)});function Bl(t,e,r){if(!F.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,S){return!F.isUndefined(S[k])});const i=r.metaTokens,a=r.visitor||g,u=r.dots,c=r.indexes,h=(r.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(a))throw new TypeError("visitor must be a function");function m(b){if(b===null)return"";if(F.isDate(b))return b.toISOString();if(F.isBoolean(b))return b.toString();if(!h&&F.isBlob(b))throw new pe("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(b)||F.isTypedArray(b)?h&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function g(b,k,S){let R=b;if(b&&!S&&typeof b=="object"){if(F.endsWith(k,"{}"))k=i?k:k.slice(0,-2),b=JSON.stringify(b);else if(F.isArray(b)&&MT(b)||(F.isFileList(b)||F.endsWith(k,"[]"))&&(R=F.toArray(b)))return k=Z0(k),R.forEach(function(I,O){!(F.isUndefined(I)||I===null)&&e.append(c===!0?zg([k],O,u):c===null?k:k+"[]",m(I))}),!1}return Vd(b)?!0:(e.append(zg(S,k,u),m(b)),!1)}const v=[],w=Object.assign(FT,{defaultVisitor:g,convertValue:m,isVisitable:Vd});function E(b,k){if(!F.isUndefined(b)){if(v.indexOf(b)!==-1)throw Error("Circular reference detected in "+k.join("."));v.push(b),F.forEach(b,function(R,V){(!(F.isUndefined(R)||R===null)&&a.call(e,R,F.isString(V)?V.trim():V,k,w))===!0&&E(R,k?k.concat(V):[V])}),v.pop()}}if(!F.isObject(t))throw new TypeError("data must be an object");return E(t),e}function $g(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function Sf(t,e){this._pairs=[],t&&Bl(t,this,e)}const ex=Sf.prototype;ex.append=function(e,r){this._pairs.push([e,r])};ex.toString=function(e){const r=e?function(i){return e.call(this,i,$g)}:$g;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function VT(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tx(t,e,r){if(!e)return t;const i=r&&r.encode||VT,a=F.isFunction(r)?{serialize:r}:r,u=a&&a.serialize;let c;if(u?c=u(e,a):c=F.isURLSearchParams(e)?e.toString():new Sf(e,a).toString(i),c){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}class Hg{constructor(){this.handlers=[]}use(e,r,i){return this.handlers.push({fulfilled:e,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,function(i){i!==null&&e(i)})}}const bf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},BT=typeof URLSearchParams<"u"?URLSearchParams:Sf,UT=typeof FormData<"u"?FormData:null,zT=typeof Blob<"u"?Blob:null,$T={isBrowser:!0,classes:{URLSearchParams:BT,FormData:UT,Blob:zT},protocols:["http","https","file","blob","url","data"]},kf=typeof window<"u"&&typeof document<"u",Bd=typeof navigator=="object"&&navigator||void 0,HT=kf&&(!Bd||["ReactNative","NativeScript","NS"].indexOf(Bd.product)<0),WT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qT=kf&&window.location.href||"http://localhost",KT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:kf,hasStandardBrowserEnv:HT,hasStandardBrowserWebWorkerEnv:WT,navigator:Bd,origin:qT},Symbol.toStringTag,{value:"Module"})),xt={...KT,...$T};function QT(t,e){return Bl(t,new xt.classes.URLSearchParams,{visitor:function(r,i,a,u){return xt.isNode&&F.isBuffer(r)?(this.append(i,r.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...e})}function GT(t){return F.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function YT(t){const e={},r=Object.keys(t);let i;const a=r.length;let u;for(i=0;i=r.length;return c=!c&&F.isArray(a)?a.length:c,h?(F.hasOwnProp(a,c)?a[c]=[a[c],i]:a[c]=i,!f):((!a[c]||!F.isObject(a[c]))&&(a[c]=[]),e(r,i,a[c],u)&&F.isArray(a[c])&&(a[c]=YT(a[c])),!f)}if(F.isFormData(t)&&F.isFunction(t.entries)){const r={};return F.forEachEntry(t,(i,a)=>{e(GT(i),a,r,0)}),r}return null}function XT(t,e,r){if(F.isString(t))try{return(e||JSON.parse)(t),F.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(t)}const Do={transitional:bf,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const i=r.getContentType()||"",a=i.indexOf("application/json")>-1,u=F.isObject(e);if(u&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return a?JSON.stringify(nx(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e)||F.isReadableStream(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(u){if(i.indexOf("application/x-www-form-urlencoded")>-1)return QT(e,this.formSerializer).toString();if((f=F.isFileList(e))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Bl(f?{"files[]":e}:e,h&&new h,this.formSerializer)}}return u||a?(r.setContentType("application/json",!1),XT(e)):e}],transformResponse:[function(e){const r=this.transitional||Do.transitional,i=r&&r.forcedJSONParsing,a=this.responseType==="json";if(F.isResponse(e)||F.isReadableStream(e))return e;if(e&&F.isString(e)&&(i&&!this.responseType||a)){const c=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(e,this.parseReviver)}catch(f){if(c)throw f.name==="SyntaxError"?pe.from(f,pe.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],t=>{Do.headers[t]={}});const JT=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZT=t=>{const e={};let r,i,a;return t&&t.split(` `).forEach(function(c){a=c.indexOf(":"),r=c.substring(0,a).trim().toLowerCase(),i=c.substring(a+1).trim(),!(!r||e[r]&&JT[r])&&(r==="set-cookie"?e[r]?e[r].push(i):e[r]=[i]:e[r]=e[r]?e[r]+", "+i:i)}),e},Wg=Symbol("internals");function Ji(t){return t&&String(t).trim().toLowerCase()}function fl(t){return t===!1||t==null?t:F.isArray(t)?t.map(fl):String(t)}function eC(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(t);)e[i[1]]=i[2];return e}const tC=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Xc(t,e,r,i,a){if(F.isFunction(i))return i.call(this,e,r);if(a&&(e=r),!!F.isString(e)){if(F.isString(i))return e.indexOf(i)!==-1;if(F.isRegExp(i))return i.test(e)}}function nC(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,i)=>r.toUpperCase()+i)}function rC(t,e){const r=F.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+r,{value:function(a,u,c){return this[i].call(this,e,a,u,c)},configurable:!0})})}let It=class{constructor(e){e&&this.set(e)}set(e,r,i){const a=this;function u(f,h,m){const g=Ji(h);if(!g)throw new Error("header name must be a non-empty string");const v=F.findKey(a,g);(!v||a[v]===void 0||m===!0||m===void 0&&a[v]!==!1)&&(a[v||h]=fl(f))}const c=(f,h)=>F.forEach(f,(m,g)=>u(m,g,h));if(F.isPlainObject(e)||e instanceof this.constructor)c(e,r);else if(F.isString(e)&&(e=e.trim())&&!tC(e))c(ZT(e),r);else if(F.isObject(e)&&F.isIterable(e)){let f={},h,m;for(const g of e){if(!F.isArray(g))throw TypeError("Object iterator must return a key-value pair");f[m=g[0]]=(h=f[m])?F.isArray(h)?[...h,g[1]]:[h,g[1]]:g[1]}c(f,r)}else e!=null&&u(r,e,i);return this}get(e,r){if(e=Ji(e),e){const i=F.findKey(this,e);if(i){const a=this[i];if(!r)return a;if(r===!0)return eC(a);if(F.isFunction(r))return r.call(this,a,i);if(F.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Ji(e),e){const i=F.findKey(this,e);return!!(i&&this[i]!==void 0&&(!r||Xc(this,this[i],i,r)))}return!1}delete(e,r){const i=this;let a=!1;function u(c){if(c=Ji(c),c){const f=F.findKey(i,c);f&&(!r||Xc(i,i[f],f,r))&&(delete i[f],a=!0)}}return F.isArray(e)?e.forEach(u):u(e),a}clear(e){const r=Object.keys(this);let i=r.length,a=!1;for(;i--;){const u=r[i];(!e||Xc(this,this[u],u,e,!0))&&(delete this[u],a=!0)}return a}normalize(e){const r=this,i={};return F.forEach(this,(a,u)=>{const c=F.findKey(i,u);if(c){r[c]=fl(a),delete r[u];return}const f=e?nC(u):String(u).trim();f!==u&&delete r[u],r[f]=fl(a),i[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return F.forEach(this,(i,a)=>{i!=null&&i!==!1&&(r[a]=e&&F.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const i=new this(e);return r.forEach(a=>i.set(a)),i}static accessor(e){const i=(this[Wg]=this[Wg]={accessors:{}}).accessors,a=this.prototype;function u(c){const f=Ji(c);i[f]||(rC(a,c),i[f]=!0)}return F.isArray(e)?e.forEach(u):u(e),this}};It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.reduceDescriptors(It.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[r]=i}}});F.freezeMethods(It);function Jc(t,e){const r=this||Do,i=e||r,a=It.from(i.headers);let u=i.data;return F.forEach(t,function(f){u=f.call(r,u,a.normalize(),e?e.status:void 0)}),a.normalize(),u}function rx(t){return!!(t&&t.__CANCEL__)}let Mo=class extends pe{constructor(e,r,i){super(e??"canceled",pe.ERR_CANCELED,r,i),this.name="CanceledError",this.__CANCEL__=!0}};function sx(t,e,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?t(r):e(new pe("Request failed with status code "+r.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function sC(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function iC(t,e){t=t||10;const r=new Array(t),i=new Array(t);let a=0,u=0,c;return e=e!==void 0?e:1e3,function(h){const m=Date.now(),g=i[u];c||(c=m),r[a]=h,i[a]=m;let v=u,w=0;for(;v!==a;)w+=r[v++],v=v%t;if(a=(a+1)%t,a===u&&(u=(u+1)%t),m-c{r=g,a=null,u&&(clearTimeout(u),u=null),t(...m)};return[(...m)=>{const g=Date.now(),v=g-r;v>=i?c(m,g):(a=m,u||(u=setTimeout(()=>{u=null,c(a)},i-v)))},()=>a&&c(a)]}const Tl=(t,e,r=3)=>{let i=0;const a=iC(50,250);return oC(u=>{const c=u.loaded,f=u.lengthComputable?u.total:void 0,h=c-i,m=a(h),g=c<=f;i=c;const v={loaded:c,total:f,progress:f?c/f:void 0,bytes:h,rate:m||void 0,estimated:m&&f&&g?(f-c)/m:void 0,event:u,lengthComputable:f!=null,[e?"download":"upload"]:!0};t(v)},r)},qg=(t,e)=>{const r=t!=null;return[i=>e[0]({lengthComputable:r,total:t,loaded:i}),e[1]]},Kg=t=>(...e)=>F.asap(()=>t(...e)),aC=xt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,xt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,lC=xt.hasStandardBrowserEnv?{write(t,e,r,i,a,u,c){if(typeof document>"u")return;const f=[`${t}=${encodeURIComponent(e)}`];F.isNumber(r)&&f.push(`expires=${new Date(r).toUTCString()}`),F.isString(i)&&f.push(`path=${i}`),F.isString(a)&&f.push(`domain=${a}`),u===!0&&f.push("secure"),F.isString(c)&&f.push(`SameSite=${c}`),document.cookie=f.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function uC(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function cC(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ix(t,e,r){let i=!uC(e);return t&&(i||r==!1)?cC(t,e):e}const Qg=t=>t instanceof It?{...t}:t;function cs(t,e){e=e||{};const r={};function i(m,g,v,w){return F.isPlainObject(m)&&F.isPlainObject(g)?F.merge.call({caseless:w},m,g):F.isPlainObject(g)?F.merge({},g):F.isArray(g)?g.slice():g}function a(m,g,v,w){if(F.isUndefined(g)){if(!F.isUndefined(m))return i(void 0,m,v,w)}else return i(m,g,v,w)}function u(m,g){if(!F.isUndefined(g))return i(void 0,g)}function c(m,g){if(F.isUndefined(g)){if(!F.isUndefined(m))return i(void 0,m)}else return i(void 0,g)}function f(m,g,v){if(v in e)return i(m,g);if(v in t)return i(void 0,m)}const h={url:u,method:u,data:u,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:f,headers:(m,g,v)=>a(Qg(m),Qg(g),v,!0)};return F.forEach(Object.keys({...t,...e}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=F.hasOwnProp(h,g)?h[g]:a,w=v(t[g],e[g],g);F.isUndefined(w)&&v!==f||(r[g]=w)}),r}const ox=t=>{const e=cs({},t);let{data:r,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:u,headers:c,auth:f}=e;if(e.headers=c=It.from(c),e.url=tx(ix(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),f&&c.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),F.isFormData(r)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(F.isFunction(r.getHeaders)){const h=r.getHeaders(),m=["content-type","content-length"];Object.entries(h).forEach(([g,v])=>{m.includes(g.toLowerCase())&&c.set(g,v)})}}if(xt.hasStandardBrowserEnv&&(i&&F.isFunction(i)&&(i=i(e)),i||i!==!1&&aC(e.url))){const h=a&&u&&lC.read(u);h&&c.set(a,h)}return e},dC=typeof XMLHttpRequest<"u",fC=dC&&function(t){return new Promise(function(r,i){const a=ox(t);let u=a.data;const c=It.from(a.headers).normalize();let{responseType:f,onUploadProgress:h,onDownloadProgress:m}=a,g,v,w,E,b;function k(){E&&E(),b&&b(),a.cancelToken&&a.cancelToken.unsubscribe(g),a.signal&&a.signal.removeEventListener("abort",g)}let S=new XMLHttpRequest;S.open(a.method.toUpperCase(),a.url,!0),S.timeout=a.timeout;function R(){if(!S)return;const I=It.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),B={data:!f||f==="text"||f==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:I,config:t,request:S};sx(function(G){r(G),k()},function(G){i(G),k()},B),S=null}"onloadend"in S?S.onloadend=R:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(R)},S.onabort=function(){S&&(i(new pe("Request aborted",pe.ECONNABORTED,t,S)),S=null)},S.onerror=function(O){const B=O&&O.message?O.message:"Network Error",K=new pe(B,pe.ERR_NETWORK,t,S);K.event=O||null,i(K),S=null},S.ontimeout=function(){let O=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const B=a.transitional||bf;a.timeoutErrorMessage&&(O=a.timeoutErrorMessage),i(new pe(O,B.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,t,S)),S=null},u===void 0&&c.setContentType(null),"setRequestHeader"in S&&F.forEach(c.toJSON(),function(O,B){S.setRequestHeader(B,O)}),F.isUndefined(a.withCredentials)||(S.withCredentials=!!a.withCredentials),f&&f!=="json"&&(S.responseType=a.responseType),m&&([w,b]=Tl(m,!0),S.addEventListener("progress",w)),h&&S.upload&&([v,E]=Tl(h),S.upload.addEventListener("progress",v),S.upload.addEventListener("loadend",E)),(a.cancelToken||a.signal)&&(g=I=>{S&&(i(!I||I.type?new Mo(null,t,S):I),S.abort(),S=null)},a.cancelToken&&a.cancelToken.subscribe(g),a.signal&&(a.signal.aborted?g():a.signal.addEventListener("abort",g)));const V=sC(a.url);if(V&&xt.protocols.indexOf(V)===-1){i(new pe("Unsupported protocol "+V+":",pe.ERR_BAD_REQUEST,t));return}S.send(u||null)})},hC=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let i=new AbortController,a;const u=function(m){if(!a){a=!0,f();const g=m instanceof Error?m:this.reason;i.abort(g instanceof pe?g:new Mo(g instanceof Error?g.message:g))}};let c=e&&setTimeout(()=>{c=null,u(new pe(`timeout of ${e}ms exceeded`,pe.ETIMEDOUT))},e);const f=()=>{t&&(c&&clearTimeout(c),c=null,t.forEach(m=>{m.unsubscribe?m.unsubscribe(u):m.removeEventListener("abort",u)}),t=null)};t.forEach(m=>m.addEventListener("abort",u));const{signal:h}=i;return h.unsubscribe=()=>F.asap(f),h}},pC=function*(t,e){let r=t.byteLength;if(r{const a=mC(t,e);let u=0,c,f=h=>{c||(c=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:m,value:g}=await a.next();if(m){f(),h.close();return}let v=g.byteLength;if(r){let w=u+=v;r(w)}h.enqueue(new Uint8Array(g))}catch(m){throw f(m),m}},cancel(h){return f(h),a.return()}},{highWaterMark:2})},Yg=64*1024,{isFunction:tl}=F,yC=(({Request:t,Response:e})=>({Request:t,Response:e}))(F.global),{ReadableStream:Xg,TextEncoder:Jg}=F.global,Zg=(t,...e)=>{try{return!!t(...e)}catch{return!1}},vC=t=>{t=F.merge.call({skipUndefined:!0},yC,t);const{fetch:e,Request:r,Response:i}=t,a=e?tl(e):typeof fetch=="function",u=tl(r),c=tl(i);if(!a)return!1;const f=a&&tl(Xg),h=a&&(typeof Jg=="function"?(b=>k=>b.encode(k))(new Jg):async b=>new Uint8Array(await new r(b).arrayBuffer())),m=u&&f&&Zg(()=>{let b=!1;const k=new r(xt.origin,{body:new Xg,method:"POST",get duplex(){return b=!0,"half"}}).headers.has("Content-Type");return b&&!k}),g=c&&f&&Zg(()=>F.isReadableStream(new i("").body)),v={stream:g&&(b=>b.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!v[b]&&(v[b]=(k,S)=>{let R=k&&k[b];if(R)return R.call(k);throw new pe(`Response type '${b}' is not supported`,pe.ERR_NOT_SUPPORT,S)})});const w=async b=>{if(b==null)return 0;if(F.isBlob(b))return b.size;if(F.isSpecCompliantForm(b))return(await new r(xt.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(F.isArrayBufferView(b)||F.isArrayBuffer(b))return b.byteLength;if(F.isURLSearchParams(b)&&(b=b+""),F.isString(b))return(await h(b)).byteLength},E=async(b,k)=>{const S=F.toFiniteNumber(b.getContentLength());return S??w(k)};return async b=>{let{url:k,method:S,data:R,signal:V,cancelToken:I,timeout:O,onDownloadProgress:B,onUploadProgress:K,responseType:G,headers:L,withCredentials:J="same-origin",fetchOptions:de}=ox(b),me=e||fetch;G=G?(G+"").toLowerCase():"text";let Re=hC([V,I&&I.toAbortSignal()],O),Ie=null;const _e=Re&&Re.unsubscribe&&(()=>{Re.unsubscribe()});let De;try{if(K&&m&&S!=="get"&&S!=="head"&&(De=await E(L,R))!==0){let _=new r(k,{method:"POST",body:R,duplex:"half"}),z;if(F.isFormData(R)&&(z=_.headers.get("content-type"))&&L.setContentType(z),_.body){const[ye,ve]=qg(De,Tl(Kg(K)));R=Gg(_.body,Yg,ye,ve)}}F.isString(J)||(J=J?"include":"omit");const we=u&&"credentials"in r.prototype,fe={...de,signal:Re,method:S.toUpperCase(),headers:L.normalize().toJSON(),body:R,duplex:"half",credentials:we?J:void 0};Ie=u&&new r(k,fe);let q=await(u?me(Ie,de):me(k,fe));const se=g&&(G==="stream"||G==="response");if(g&&(B||se&&_e)){const _={};["status","statusText","headers"].forEach(le=>{_[le]=q[le]});const z=F.toFiniteNumber(q.headers.get("content-length")),[ye,ve]=B&&qg(z,Tl(Kg(B),!0))||[];q=new i(Gg(q.body,Yg,ye,()=>{ve&&ve(),_e&&_e()}),_)}G=G||"text";let U=await v[F.findKey(v,G)||"text"](q,b);return!se&&_e&&_e(),await new Promise((_,z)=>{sx(_,z,{data:U,headers:It.from(q.headers),status:q.status,statusText:q.statusText,config:b,request:Ie})})}catch(we){throw _e&&_e(),we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,b,Ie,we&&we.response),{cause:we.cause||we}):pe.from(we,we&&we.code,b,Ie,we&&we.response)}}},xC=new Map,ax=t=>{let e=t&&t.env||{};const{fetch:r,Request:i,Response:a}=e,u=[i,a,r];let c=u.length,f=c,h,m,g=xC;for(;f--;)h=u[f],m=g.get(h),m===void 0&&g.set(h,m=f?new Map:vC(e)),g=m;return m};ax();const Ef={http:DT,xhr:fC,fetch:{get:ax}};F.forEach(Ef,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ey=t=>`- ${t}`,wC=t=>F.isFunction(t)||t===null||t===!1;function SC(t,e){t=F.isArray(t)?t:[t];const{length:r}=t;let i,a;const u={};for(let c=0;c`adapter ${h} `+(m===!1?"is not supported by the environment":"is not available in the build"));let f=r?c.length>1?`since : `+c.map(ey).join(` `):" "+ey(c[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return a}const lx={getAdapter:SC,adapters:Ef};function Zc(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Mo(null,t)}function ty(t){return Zc(t),t.headers=It.from(t.headers),t.data=Jc.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),lx.getAdapter(t.adapter||Do.adapter,t)(t).then(function(i){return Zc(t),i.data=Jc.call(t,t.transformResponse,i),i.headers=It.from(i.headers),i},function(i){return rx(i)||(Zc(t),i&&i.response&&(i.response.data=Jc.call(t,t.transformResponse,i.response),i.response.headers=It.from(i.response.headers))),Promise.reject(i)})}const ux="1.13.5",Ul={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ul[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const ny={};Ul.transitional=function(e,r,i){function a(u,c){return"[Axios v"+ux+"] Transitional option '"+u+"'"+c+(i?". "+i:"")}return(u,c,f)=>{if(e===!1)throw new pe(a(c," has been removed"+(r?" in "+r:"")),pe.ERR_DEPRECATED);return r&&!ny[c]&&(ny[c]=!0,console.warn(a(c," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(u,c,f):!0}};Ul.spelling=function(e){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function bC(t,e,r){if(typeof t!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let a=i.length;for(;a-- >0;){const u=i[a],c=e[u];if(c){const f=t[u],h=f===void 0||c(f,u,t);if(h!==!0)throw new pe("option "+u+" must be "+h,pe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new pe("Unknown option "+u,pe.ERR_BAD_OPTION)}}const hl={assertOptions:bC,validators:Ul},Qt=hl.validators;let as=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Hg,response:new Hg}}async request(e,r){try{return await this._request(e,r)}catch(i){if(i instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=a.stack?a.stack.replace(/^.+\n/,""):"";try{i.stack?u&&!String(i.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(i.stack+=` `+u):i.stack=u}catch{}}throw i}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=cs(this.defaults,r);const{transitional:i,paramsSerializer:a,headers:u}=r;i!==void 0&&hl.assertOptions(i,{silentJSONParsing:Qt.transitional(Qt.boolean),forcedJSONParsing:Qt.transitional(Qt.boolean),clarifyTimeoutError:Qt.transitional(Qt.boolean),legacyInterceptorReqResOrdering:Qt.transitional(Qt.boolean)},!1),a!=null&&(F.isFunction(a)?r.paramsSerializer={serialize:a}:hl.assertOptions(a,{encode:Qt.function,serialize:Qt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),hl.assertOptions(r,{baseUrl:Qt.spelling("baseURL"),withXsrfToken:Qt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=u&&F.merge(u.common,u[r.method]);u&&F.forEach(["delete","get","head","post","put","patch","common"],b=>{delete u[b]}),r.headers=It.concat(c,u);const f=[];let h=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(r)===!1)return;h=h&&k.synchronous;const S=r.transitional||bf;S&&S.legacyInterceptorReqResOrdering?f.unshift(k.fulfilled,k.rejected):f.push(k.fulfilled,k.rejected)});const m=[];this.interceptors.response.forEach(function(k){m.push(k.fulfilled,k.rejected)});let g,v=0,w;if(!h){const b=[ty.bind(this),void 0];for(b.unshift(...f),b.push(...m),w=b.length,g=Promise.resolve(r);v{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](a);i._listeners=null}),this.promise.then=a=>{let u;const c=new Promise(f=>{i.subscribe(f),u=f}).then(a);return c.cancel=function(){i.unsubscribe(u)},c},e(function(u,c,f){i.reason||(i.reason=new Mo(u,c,f),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=i=>{e.abort(i)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new cx(function(a){e=a}),cancel:e}}};function EC(t){return function(r){return t.apply(null,r)}}function TC(t){return F.isObject(t)&&t.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ud).forEach(([t,e])=>{Ud[e]=t});function dx(t){const e=new as(t),r=H0(as.prototype.request,e);return F.extend(r,as.prototype,e,{allOwnKeys:!0}),F.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return dx(cs(t,a))},r}const Xe=dx(Do);Xe.Axios=as;Xe.CanceledError=Mo;Xe.CancelToken=kC;Xe.isCancel=rx;Xe.VERSION=ux;Xe.toFormData=Bl;Xe.AxiosError=pe;Xe.Cancel=Xe.CanceledError;Xe.all=function(e){return Promise.all(e)};Xe.spread=EC;Xe.isAxiosError=TC;Xe.mergeConfig=cs;Xe.AxiosHeaders=It;Xe.formToJSON=t=>nx(F.isHTMLForm(t)?new FormData(t):t);Xe.getAdapter=lx.getAdapter;Xe.HttpStatusCode=Ud;Xe.default=Xe;const{Axios:nO,AxiosError:rO,CanceledError:sO,isCancel:iO,CancelToken:oO,VERSION:aO,all:lO,Cancel:uO,isAxiosError:cO,spread:dO,toFormData:fO,AxiosHeaders:hO,HttpStatusCode:pO,formToJSON:mO,getAdapter:gO,mergeConfig:yO}=Xe,CC=typeof window>"u",ry=!CC&&window.self!==window.top,ed=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ut=[];for(let t=0;t<256;++t)ut.push((t+256).toString(16).slice(1));function AC(t,e=0){return(ut[t[e+0]]+ut[t[e+1]]+ut[t[e+2]]+ut[t[e+3]]+"-"+ut[t[e+4]]+ut[t[e+5]]+"-"+ut[t[e+6]]+ut[t[e+7]]+"-"+ut[t[e+8]]+ut[t[e+9]]+"-"+ut[t[e+10]]+ut[t[e+11]]+ut[t[e+12]]+ut[t[e+13]]+ut[t[e+14]]+ut[t[e+15]]).toLowerCase()}let td;const PC=new Uint8Array(16);function RC(){if(!td){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");td=crypto.getRandomValues.bind(crypto)}return td(PC)}const _C=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sy={randomUUID:_C};function NC(t,e,r){var a;t=t||{};const i=t.random??((a=t.rng)==null?void 0:a.call(t))??RC();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,AC(i)}function jC(t,e,r){return sy.randomUUID&&!t?sy.randomUUID():NC(t)}class OC extends Error{constructor(e,r,i,a,u){super(e),this.name="Base44Error",this.status=r,this.code=i,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function io({baseURL:t,headers:e={},token:r,interceptResponses:i=!0,onError:a}){const u=Xe.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...e}});return r&&(u.defaults.headers.common.Authorization=`Bearer ${r}`),u.interceptors.request.use(c=>{typeof window<"u"&&c.headers.set("X-Origin-URL",window.location.href);const f=jC();if(c.requestId=f,ry)try{window.parent.postMessage({type:"api-request-start",requestId:f,data:{url:t+c.url,method:c.method,body:c.data instanceof FormData?"[FormData object]":c.data}},"*")}catch{}return c}),i&&u.interceptors.response.use(c=>{var f;const h=(f=c.config)===null||f===void 0?void 0:f.requestId;try{ry&&h&&window.parent.postMessage({type:"api-request-end",requestId:h,data:{statusCode:c.status,response:c.data}},"*")}catch{}return c.data},c=>{var f,h,m,g,v,w,E,b;const k=((h=(f=c.response)===null||f===void 0?void 0:f.data)===null||h===void 0?void 0:h.message)||((g=(m=c.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.detail)||c.message,S=new OC(k,(v=c.response)===null||v===void 0?void 0:v.status,(E=(w=c.response)===null||w===void 0?void 0:w.data)===null||E===void 0?void 0:E.code,(b=c.response)===null||b===void 0?void 0:b.data,c);return a==null||a(S),Promise.reject(S)}),u}function iy(t){const{axios:e,appId:r,getSocket:i}=t;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return LC(e,r,u,i)}})}function IC(t){var e;try{const r=JSON.parse(t);return{type:r.type,data:r.data,id:r.id||((e=r.data)===null||e===void 0?void 0:e.id),timestamp:r.timestamp||new Date().toISOString()}}catch(r){return console.warn("[Base44 SDK] Failed to parse realtime message:",r),null}}function LC(t,e,r,i){const a=`/apps/${e}/entities/${r}`;return{async list(u,c,f,h){const m={};return u&&(m.sort=u),c&&(m.limit=c),f&&(m.skip=f),h&&(m.fields=Array.isArray(h)?h.join(","):h),t.get(a,{params:m})},async filter(u,c,f,h,m){const g={q:JSON.stringify(u)};return c&&(g.sort=c),f&&(g.limit=f),h&&(g.skip=h),m&&(g.fields=Array.isArray(m)?m.join(","):m),t.get(a,{params:g})},async get(u){return t.get(`${a}/${u}`)},async create(u){return t.post(a,u)},async update(u,c){return t.put(`${a}/${u}`,c)},async delete(u){return t.delete(`${a}/${u}`)},async deleteMany(u){return t.delete(a,{data:u})},async bulkCreate(u){return t.post(`${a}/bulk`,u)},async updateMany(u,c){return t.patch(`${a}/update-many`,{query:u,data:c})},async bulkUpdate(u){return t.put(`${a}/bulk`,u)},async importEntities(u){const c=new FormData;return c.append("file",u,u.name),t.post(`${a}/import`,c,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const c=`entities:${e}:${r}`;return i().subscribeToRoom(c,{update_model:m=>{const g=IC(m.data);if(g)try{u(g)}catch(v){console.error("[Base44 SDK] Subscription callback error:",v)}}})}}}function DC(t,e){return{async call(r,i,a){if(!(r!=null&&r.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(i!=null&&i.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:c,...f}=a??{},h={...f,...u&&{path_params:u},...c&&{query_params:c}};return await t.post(`/apps/${e}/integrations/custom/${r}/${i}`,h)}}}function oy(t,e){const r=DC(t,e);return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?r:new Proxy({},{get(u,c){if(!(typeof c!="string"||c==="then"||c.startsWith("_")))return async f=>{if(typeof f=="string")throw new Error(`Integration ${c} must receive an object with named parameters, received: ${f}`);let h,m;return f instanceof FormData||f&&Object.values(f).some(g=>g instanceof File)?(h=new FormData,Object.keys(f).forEach(g=>{f[g]instanceof File?h.append(g,f[g],f[g].name):typeof f[g]=="object"&&f[g]!==null?h.append(g,JSON.stringify(f[g])):h.append(g,f[g])}),m="multipart/form-data"):(h=f,m="application/json"),a==="Core"?t.post(`/apps/${e}/integration-endpoints/Core/${c}`,h||f,{headers:{"Content-Type":m}}):t.post(`/apps/${e}/integration-endpoints/installable/${a}/integration-endpoints/${c}`,h||f,{headers:{"Content-Type":m}})}}})}})}function MC(t,e,r,i){return{async me(){return t.get(`/apps/${r}/entities/User/me`)},async updateMe(a){return t.put(`/apps/${r}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,c=`${i.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=c},loginWithProvider(a,u="/"){const c=new URL(u,window.location.origin).toString(),f=`app_id=${r}&from_url=${encodeURIComponent(c)}`;let h;a==="sso"?h=`/apps/${r}/auth/sso/login`:h=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${i.appBaseUrl}/api${h}?${f}`;window.location.href=m},logout(a){if(delete t.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(f){console.error("Failed to remove token from localStorage:",f)}const u=a||window.location.href,c=`${i.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=c}},setToken(a,u=!0){if(a&&(t.defaults.headers.common.Authorization=`Bearer ${a}`,e.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(c){console.error("Failed to save token to localStorage:",c)}},async loginViaEmailPassword(a,u,c){var f;try{const h=await t.post(`/apps/${r}/auth/login`,{email:a,password:u,...c&&{turnstile_token:c}}),{access_token:m,user:g}=h;return m&&this.setToken(m),{access_token:m,user:g}}catch(h){throw((f=h.response)===null||f===void 0?void 0:f.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return t.post(`/apps/${r}/users/invite-user`,{user_email:a,role:u})},register(a){return t.post(`/apps/${r}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return t.post(`/apps/${r}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return t.post(`/apps/${r}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return t.post(`/apps/${r}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return t.post(`/apps/${r}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:c}){return t.post(`/apps/${r}/auth/change-password`,{user_id:a,current_password:u,new_password:c})}}}function FC(t,e){return{async getAccessToken(r){const i=`/apps/${e}/auth/sso/accesstoken/${r}`;return t.get(i)}}}function VC(t,e){return{async getAccessToken(r){if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${e}/external-auth/tokens/${r}`)).access_token},async getConnection(r){var i;if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");const u=await t.get(`/apps/${e}/external-auth/tokens/${r}`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}},async getCurrentAppUserAccessToken(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${e}/app-user-auth/connectors/${r}/token`)).access_token}}}function BC(t,e){return{async connectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${e}/app-user-auth/connectors/${r}/initiate`)).redirect_url},async disconnectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${e}/app-user-auth/connectors/${r}`)}}}function Cl(t={}){const{storageKey:e="base44_access_token",paramName:r="access_token",saveToStorage:i=!0,removeFromUrl:a=!0}=t;let u=null;if(typeof window<"u"&&window.location)try{const c=new URLSearchParams(window.location.search);if(u=c.get(r),u){if(i&&UC(u,{storageKey:e}),a){c.delete(r);const f=`${window.location.pathname}${c.toString()?`?${c.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,f)}return u}}catch(c){console.error("Error retrieving token from URL:",c)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(e),u}catch(c){console.error("Error retrieving token from local storage:",c)}return null}function UC(t,e){const{storageKey:r="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(r,t),window.localStorage.setItem("token",t),!0}catch(i){return console.error("Error saving token to local storage:",i),!1}}function ay(t,e,r){const i=(u,c)=>u?`${String(u).replace(/\/$/,"")}${c}`:c,a=u=>{const c=new Headers;if(r!=null&&r.getAuthHeaders){const f=r.getAuthHeaders();Object.entries(f).forEach(([h,m])=>{m!=null&&c.set(h,String(m))})}return u&&new Headers(u).forEach((f,h)=>{c.set(h,f)}),c};return{async invoke(u,c){if(typeof c=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${c}`);let f,h;return c instanceof FormData||c&&Object.values(c).some(m=>m instanceof File)?(f=new FormData,Object.keys(c).forEach(m=>{c[m]instanceof File?f.append(m,c[m],c[m].name):typeof c[m]=="object"&&c[m]!==null?f.append(m,JSON.stringify(c[m])):f.append(m,c[m])}),h="multipart/form-data"):(f=c,h="application/json"),t.post(`/apps/${e}/functions/${u}`,f||c,{headers:{"Content-Type":h}})},async fetch(u,c={}){const h=`/functions${u.startsWith("/")?u:`/${u}`}`,m=a(c.headers),g={...c,headers:m};return await fetch(i(r==null?void 0:r.baseURL,h),g)}}}function ly({axios:t,getSocket:e,appId:r,serverUrl:i,token:a}){const u=`/apps/${r}/agents`,c={},f=()=>t.get(`${u}/conversations`),h=b=>t.get(`${u}/conversations/${b}`);return{getConversations:f,getConversation:h,listConversations:b=>t.get(`${u}/conversations`,{params:b}),createConversation:b=>t.post(`${u}/conversations`,b),addMessage:async(b,k)=>t.post(`${u}/conversations/v2/${b.id}/messages`,k),subscribeToConversation:(b,k)=>{const S=`/agent-conversations/${b}`,R=e(),V=h(b).then(I=>(c[b]=I,I));return R.subscribeToRoom(S,{connect:()=>{},update_model:async({data:I})=>{const O=JSON.parse(I);if(O._message){await V;const B=O._message,K=c[b];if(K){const G=K.messages||[],L=G.findIndex(de=>de.id===B.id),J=L!==-1?G.map((de,me)=>me===L?B:de):[...G,B];c[b]={...K,messages:J},k==null||k(c[b])}}}})},getWhatsAppConnectURL:b=>{const k=`${i}/api/apps/${r}/agents/${encodeURIComponent(b)}/whatsapp`,S=a??Cl();return S?`${k}?token=${S}`:k}}}function uy(t,e){const r=`/app-logs/${e}`;return{async logUserInApp(i){await t.post(`${r}/log-user-in-app/${i}`)},async fetchLogs(i={}){return await t.get(r,{params:i})},async getStats(i={}){return await t.get(`${r}/stats`,{params:i})}}}function zC(t,e){return{async inviteUser(r,i){if(i!=="user"&&i!=="admin")throw new Error(`Invalid role: "${i}". Role must be either "user" or "admin".`);return await t.post(`/apps/${e}/runtime/users/invite-user`,{user_email:r,role:i})}}}const En=Object.create(null);En.open="0";En.close="1";En.ping="2";En.pong="3";En.message="4";En.upgrade="5";En.noop="6";const pl=Object.create(null);Object.keys(En).forEach(t=>{pl[En[t]]=t});const zd={type:"error",data:"parser error"},fx=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",hx=typeof ArrayBuffer=="function",px=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Tf=({type:t,data:e},r,i)=>fx&&e instanceof Blob?r?i(e):cy(e,i):hx&&(e instanceof ArrayBuffer||px(e))?r?i(e):cy(new Blob([e]),i):i(En[t]+(e||"")),cy=(t,e)=>{const r=new FileReader;return r.onload=function(){const i=r.result.split(",")[1];e("b"+(i||""))},r.readAsDataURL(t)};function dy(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let nd;function $C(t,e){if(fx&&t.data instanceof Blob)return t.data.arrayBuffer().then(dy).then(e);if(hx&&(t.data instanceof ArrayBuffer||px(t.data)))return e(dy(t.data));Tf(t,!1,r=>{nd||(nd=new TextEncoder),e(nd.encode(r))})}const fy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,r=t.length,i,a=0,u,c,f,h;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const m=new ArrayBuffer(e),g=new Uint8Array(m);for(i=0;i>4,g[a++]=(c&15)<<4|f>>2,g[a++]=(f&3)<<6|h&63;return m},WC=typeof ArrayBuffer=="function",Cf=(t,e)=>{if(typeof t!="string")return{type:"message",data:mx(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:qC(t.substring(1),e)}:pl[r]?t.length>1?{type:pl[r],data:t.substring(1)}:{type:pl[r]}:zd},qC=(t,e)=>{if(WC){const r=HC(t);return mx(r,e)}else return{base64:!0,data:t}},mx=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},gx="",KC=(t,e)=>{const r=t.length,i=new Array(r);let a=0;t.forEach((u,c)=>{Tf(u,!1,f=>{i[c]=f,++a===r&&e(i.join(gx))})})},QC=(t,e)=>{const r=t.split(gx),i=[];for(let a=0;a{const i=r.length;let a;if(i<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,i);else if(i<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,i)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(i))}t.data&&typeof t.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(r)})}})}let rd;function nl(t){return t.reduce((e,r)=>e+r.length,0)}function rl(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let i=0;for(let a=0;aMath.pow(2,21)-1){f.enqueue(zd);break}a=g*Math.pow(2,32)+m.getUint32(4),i=3}else{if(nl(r)t){f.enqueue(zd);break}}}})}const yx=4;function Ze(t){if(t)return XC(t)}function XC(t){for(var e in Ze.prototype)t[e]=Ze.prototype[e];return t}Ze.prototype.on=Ze.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Ze.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};Ze.prototype.off=Ze.prototype.removeListener=Ze.prototype.removeAllListeners=Ze.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var i,a=0;aPromise.resolve().then(e):(e,r)=>r(e,0),Zt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),JC="arraybuffer";function vx(t,...e){return e.reduce((r,i)=>(t.hasOwnProperty(i)&&(r[i]=t[i]),r),{})}const ZC=Zt.setTimeout,eA=Zt.clearTimeout;function $l(t,e){e.useNativeTimers?(t.setTimeoutFn=ZC.bind(Zt),t.clearTimeoutFn=eA.bind(Zt)):(t.setTimeoutFn=Zt.setTimeout.bind(Zt),t.clearTimeoutFn=Zt.clearTimeout.bind(Zt))}const tA=1.33;function nA(t){return typeof t=="string"?rA(t):Math.ceil((t.byteLength||t.size)*tA)}function rA(t){let e=0,r=0;for(let i=0,a=t.length;i=57344?r+=3:(i++,r+=4);return r}function xx(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sA(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function iA(t){let e={},r=t.split("&");for(let i=0,a=r.length;i{this.readyState="paused",e()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||r()})),this.writable||(i++,this.once("drain",function(){--i||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};QC(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,KC(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=xx()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let wx=!1;try{wx=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const lA=wx;function uA(){}class cA extends aA{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}}doWrite(e,r){const i=this.request({method:"POST",data:e});i.on("success",r),i.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,i)=>{this.onError("xhr poll error",r,i)}),this.pollXhr=e}}class Sn extends Ze{constructor(e,r,i){super(),this.createRequest=e,$l(this,i),this._opts=i,this._method=i.method||"GET",this._uri=r,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var e;const r=vx(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(r);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&i.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var a;i.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=Sn.requestsCount++,Sn.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=uA,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Sn.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Sn.requestsCount=0;Sn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hy);else if(typeof addEventListener=="function"){const t="onpagehide"in Zt?"pagehide":"unload";addEventListener(t,hy,!1)}}function hy(){for(let t in Sn.requests)Sn.requests.hasOwnProperty(t)&&Sn.requests[t].abort()}const dA=(function(){const t=Sx({xdomain:!1});return t&&t.responseType!==null})();class fA extends cA{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=dA&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Sn(Sx,this.uri(),e)}}function Sx(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||lA))return new XMLHttpRequest}catch{}if(!e)try{return new Zt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const bx=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class hA extends Af{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,i=bx?{}:vx(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,i)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r{try{this.doWrite(i,u)}catch{}a&&zl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=xx()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const sd=Zt.WebSocket||Zt.MozWebSocket;class pA extends hA{createSocket(e,r,i){return bx?new sd(e,r,i):r?new sd(e,r):new sd(e)}doWrite(e,r){this.ws.send(r)}}class mA extends Af{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=YC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=e.readable.pipeThrough(r).getReader(),a=GC();a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();const u=()=>{i.read().then(({done:f,value:h})=>{f||(this.onPacket(h),u())}).catch(f=>{})};u();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r{a&&zl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const gA={websocket:pA,webtransport:mA,polling:fA},yA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $d(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),i=t.indexOf("]");r!=-1&&i!=-1&&(t=t.substring(0,r)+t.substring(r,i).replace(/:/g,";")+t.substring(i,t.length));let a=yA.exec(t||""),u={},c=14;for(;c--;)u[vA[c]]=a[c]||"";return r!=-1&&i!=-1&&(u.source=e,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=xA(u,u.path),u.queryKey=wA(u,u.query),u}function xA(t,e){const r=/\/{2,9}/g,i=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&i.splice(0,1),e.slice(-1)=="/"&&i.splice(i.length-1,1),i}function wA(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,a,u){a&&(r[a]=u)}),r}const Hd=typeof addEventListener=="function"&&typeof removeEventListener=="function",ml=[];Hd&&addEventListener("offline",()=>{ml.forEach(t=>t())},!1);class Tr extends Ze{constructor(e,r){if(super(),this.binaryType=JC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const i=$d(e);r.hostname=i.host,r.secure=i.protocol==="https"||i.protocol==="wss",r.port=i.port,i.query&&(r.query=i.query)}else r.host&&(r.hostname=$d(r.host).host);$l(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(i=>{const a=i.prototype.name;this.transports.push(a),this._transportsByName[a]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=iA(this.opts.query)),Hd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ml.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=yx,r.transport=e,this.id&&(r.sid=this.id);const i=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Tr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Tr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let i=0;i0&&r>this._maxPayload)return this.writeBuffer.slice(0,i);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,zl(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,i){return this._sendPacket("message",e,r,i),this}send(e,r,i){return this._sendPacket("message",e,r,i),this}_sendPacket(e,r,i,a){if(typeof r=="function"&&(a=r,r=void 0),typeof i=="function"&&(a=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const u={type:e,data:r,options:i};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},i=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():e()}):this.upgrading?i():e()),this}_onError(e){if(Tr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Hd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=ml.indexOf(this._offlineEventListener);i!==-1&&ml.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Tr.protocol=yx;class SA extends Tr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{i||(r.send([{type:"ping",data:"probe"}]),r.once("packet",v=>{if(!i)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Tr.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(g(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=r.name,this.emitReserved("upgradeError",w)}}))};function u(){i||(i=!0,g(),r.close(),r=null)}const c=v=>{const w=new Error("probe error: "+v);w.transport=r.name,u(),this.emitReserved("upgradeError",w)};function f(){c("transport closed")}function h(){c("socket closed")}function m(v){r&&v.name!==r.name&&u()}const g=()=>{r.removeListener("open",a),r.removeListener("error",c),r.removeListener("close",f),this.off("close",h),this.off("upgrading",m)};r.once("open",a),r.once("error",c),r.once("close",f),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{i||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let i=0;igA[a]).filter(a=>!!a)),super(e,i)}};function kA(t,e="",r){let i=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),i=$d(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const u=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+u+":"+i.port+e,i.href=i.protocol+"://"+u+(r&&r.port===i.port?"":":"+i.port),i}const EA=typeof ArrayBuffer=="function",TA=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,kx=Object.prototype.toString,CA=typeof Blob=="function"||typeof Blob<"u"&&kx.call(Blob)==="[object BlobConstructor]",AA=typeof File=="function"||typeof File<"u"&&kx.call(File)==="[object FileConstructor]";function Pf(t){return EA&&(t instanceof ArrayBuffer||TA(t))||CA&&t instanceof Blob||AA&&t instanceof File}function gl(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,i=t.length;r=0&&t.num{delete this.acks[e];for(let f=0;f{this.io.clearTimeoutFn(u),r.apply(this,f)};c.withError=!0,this.acks[e]=c}emitWithAck(e,...r){return new Promise((i,a)=>{const u=(c,f)=>c?a(c):i(f);u.withError=!0,r.push(u),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...u)=>(this._queue[0],a!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...u)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(i=>String(i.id)===e)){const i=this.acks[e];delete this.acks[e],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Te.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Te.EVENT:case Te.BINARY_EVENT:this.onevent(e);break;case Te.ACK:case Te.BINARY_ACK:this.onack(e);break;case Te.DISCONNECT:this.ondisconnect();break;case Te.CONNECT_ERROR:this.destroy();const i=new Error(e.data.message);i.data=e.data.data,this.emitReserved("connect_error",i);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const i of r)i.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let i=!1;return function(...a){i||(i=!0,r.packet({type:Te.ACK,id:e,data:a}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let i=0;i0&&t.jitter<=1?t.jitter:0,this.attempts=0}li.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};li.prototype.reset=function(){this.attempts=0};li.prototype.setMin=function(t){this.ms=t};li.prototype.setMax=function(t){this.max=t};li.prototype.setJitter=function(t){this.jitter=t};class Kd extends Ze{constructor(e,r){var i;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,$l(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((i=r.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new li({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const a=r.parser||OA;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new bA(this.uri,this.opts);const r=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const a=dn(r,"open",function(){i.onopen(),e&&e()}),u=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),e?e(f):this.maybeReconnectOnOpen()},c=dn(r,"error",u);if(this._timeout!==!1){const f=this._timeout,h=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),r.close()},f);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(a),this.subs.push(c),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(dn(e,"ping",this.onping.bind(this)),dn(e,"data",this.ondata.bind(this)),dn(e,"error",this.onerror.bind(this)),dn(e,"close",this.onclose.bind(this)),dn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){zl(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let i=this.nsps[e];return i?this._autoConnect&&!i.active&&i.connect():(i=new Ex(this,e,r),this.nsps[e]=i),i}_destroy(e){const r=Object.keys(this.nsps);for(const i of r)if(this.nsps[i].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let i=0;ie()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},r);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Zi={};function yl(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=kA(t,e.path||"/socket.io"),i=r.source,a=r.id,u=r.path,c=Zi[a]&&u in Zi[a].nsps,f=e.forceNew||e["force new connection"]||e.multiplex===!1||c;let h;return f?h=new Kd(i,e):(Zi[a]||(Zi[a]=new Kd(i,e)),h=Zi[a]),r.query&&!e.query&&(e.query=r.queryKey),h.socket(r.path,e)}Object.assign(yl,{Manager:Kd,Socket:Ex,io:yl,connect:yl});function my(t,e){var r;const i=yl(t.serverUrl,{path:t.mountPath,transports:t.transports,query:{app_id:t.appId,token:(r=t.token)!==null&&r!==void 0?r:Cl()}});return i.on("connect",async()=>{var a;return console.log("connect",i.id),(a=e.connect)===null||a===void 0?void 0:a.call(e)}),i.on("update_model",async a=>{var u;return(u=e.update_model)===null||u===void 0?void 0:u.call(e,a)}),i.on("error",async a=>{var u;return(u=e.error)===null||u===void 0?void 0:u.call(e,a)}),i.on("connect_error",async a=>{var u;return console.error("connect_error",a),(u=e.error)===null||u===void 0?void 0:u.call(e,a)}),i}function LA({config:t}){let e={...t};const r={},i={connect:async()=>{const E=[];Object.keys(r).forEach(b=>{h(b);const k=v(b);k==null||k.forEach(({connect:S})=>{const R=async()=>S==null?void 0:S();E.push(R())})}),await Promise.all(E)},update_model:async E=>{const k=v(E.room).map(S=>{var R;return(R=S.update_model)===null||R===void 0?void 0:R.call(S,E)});await Promise.all(k)},error:async E=>{console.error("error",E);const b=Object.values(r).flat().map(k=>{var S;return(S=k.error)===null||S===void 0?void 0:S.call(k,E)});await Promise.all(b)}};let a=my(t,i);function u(){c()}function c(){a&&a.disconnect()}function f(E){u(),e={...e,...E},a=my(e,i)}function h(E){a.emit("join",E)}function m(E){a.emit("leave",E)}async function g(E,b){var k;const S=JSON.stringify(b);return(k=i.update_model)===null||k===void 0?void 0:k.call(i,{room:E,data:S})}function v(E){return r[E]}return{socket:a,subscribeToRoom:(E,b)=>(r[E]||(h(E),r[E]=[]),r[E].push(b),()=>{var k,S;r[E]=(S=(k=r[E])===null||k===void 0?void 0:k.filter(R=>R!==b))!==null&&S!==void 0?S:[],r[E].length===0&&m(E)}),updateConfig:f,updateModel:g,disconnect:c}}const eo=typeof window<"u"?window:{base44SharedInstances:{}};function DA(t,e){return eo.base44SharedInstances||(eo.base44SharedInstances={}),eo.base44SharedInstances[t]||(eo.base44SharedInstances[t]={instance:e()}),eo.base44SharedInstances[t].instance}const MA="__user_heartbeat_event__",FA="__initialization_event__",VA="__session_duration_event__",gy="analytics-enable",yy="base44_analytics_session_id",BA={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},UA="analytics",Le=DA(UA,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...BA,...GA()}})),zA=({axiosClient:t,serverUrl:e,appId:r,userAuthModule:i})=>{var a;const{maxQueueSize:u,throttleTime:c,batchSize:f}=Le.config;if(!(!((a=Le.config)===null||a===void 0)&&a.enabled))return{track:()=>{},cleanup:()=>{}};let h;const m=`${e}/api/apps/${r}/analytics/track/batch`,g=async I=>{await t.request({method:"POST",url:`/apps/${r}/analytics/track/batch`,data:{events:I}})},v=I=>{try{const O=JSON.stringify({events:I}),B=new Blob([O],{type:"application/json"});return typeof navigator>"u"||O.length>6e4||!navigator.sendBeacon(m,B)}catch{return!1}},w=async(I,O={})=>{if(I.length===0)return;const B=await QA(i),K=I.map(KA(B));try{(!O.isBeacon||!v(K))&&await g(K)}catch{}},E=()=>{xy(w,{throttleTime:c,batchSize:f})},b=I=>{if(Le.requestsQueue.length>=u)return;const O=qA();Le.requestsQueue.push({...I,...O}),E()},k=()=>{xy(w,{throttleTime:c,batchSize:f}),h=wy(b),HA()},S=()=>{vy(),h==null||h(),WA(b);const I=Le.requestsQueue.splice(0);w(I,{isBeacon:!0})},R=()=>{typeof window>"u"||(document.visibilityState==="hidden"?S():document.visibilityState==="visible"&&k())},V=()=>{vy(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",R)};return E(),h=wy(b),$A(b),typeof window<"u"&&window.addEventListener("visibilitychange",R),{track:b,cleanup:V}};function vy(){Le.isProcessing=!1}async function xy(t,e){if(Le.isProcessing)return;Le.isProcessing=!0;const{throttleTime:r=1e3,batchSize:i=30}=e??{};for(;Le.isProcessing&&Le.requestsQueue.length>0;){const a=Le.requestsQueue.splice(0,i);a.length&&await t(a),await new Promise(u=>setTimeout(u,r))}Le.isProcessing=!1}function wy(t){var e;if(Le.isHeartBeatProcessing||((e=Le.config.heartBeatInterval)!==null&&e!==void 0?e:0)<10)return()=>{};Le.isHeartBeatProcessing=!0;const r=setInterval(()=>{t({eventName:MA})},Le.config.heartBeatInterval);return()=>{clearInterval(r),Le.isHeartBeatProcessing=!1}}function $A(t){typeof window>"u"||Le.wasInitializationTracked||(Le.wasInitializationTracked=!0,t({eventName:FA,properties:{referrer:document==null?void 0:document.referrer}}))}function HA(){typeof window>"u"||Le.sessionStartTime!==null||(Le.sessionStartTime=new Date().toISOString())}function WA(t){if(typeof window>"u"||Le.sessionStartTime===null)return;const e=new Date().getTime()-new Date(Le.sessionStartTime).getTime();Le.sessionStartTime=null,t({eventName:VA,properties:{sessionDuration:e}})}function qA(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function KA(t){return e=>({event_name:e.eventName,properties:e.properties,timestamp:e.timestamp,page_url:e.pageUrl,...t})}let id=null;async function QA(t){if(!Le.sessionContext){if(!id){const e=YA();id=t.me().then(r=>({user_id:r.id,session_id:e})).catch(()=>({user_id:null,session_id:e}))}Le.sessionContext=await id}return Le.sessionContext}function GA(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get(gy);if(e==null||!e.length)return;const r=new URLSearchParams(window.location.search);r.delete(gy);const i=window.location.pathname+(r.toString()?"?"+r.toString():"");return window.history.replaceState({},"",i),{enabled:e==="true"}}function YA(){if(typeof window>"u")return ed();try{const t=localStorage.getItem(yy);if(!t){const e=ed();return localStorage.setItem(yy,e),e}return t}catch{return ed()}}function XA(t){var e,r;const{serverUrl:i="https://base44.app",appId:a,token:u,serviceToken:c,requiresAuth:f=!1,appBaseUrl:h,options:m,functionsVersion:g,headers:v}=t,w=typeof h=="string"?h:"",E={serverUrl:i,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:a,token:u};let b=null;const k=()=>(b||(b=LA({config:E})),b),S={...v,"X-App-Id":String(a)},R=g?{...S,"Base44-Functions-Version":g}:S,V=io({baseURL:`${i}/api`,headers:S,token:u,onError:m==null?void 0:m.onError}),I=io({baseURL:`${i}/api`,headers:R,token:u,interceptResponses:!1,onError:m==null?void 0:m.onError}),O={...S,...u?{"on-behalf-of":`Bearer ${u}`}:{}},B=io({baseURL:`${i}/api`,headers:O,token:c,onError:m==null?void 0:m.onError}),K=io({baseURL:`${i}/api`,headers:R,token:c,interceptResponses:!1}),G=MC(V,I,a,{appBaseUrl:w}),L={entities:iy({axios:V,appId:a,getSocket:k}),integrations:oy(V,a),connectors:BC(V,a),auth:G,functions:ay(I,a,{getAuthHeaders:()=>{const me={},Re=u||Cl();return Re&&(me.Authorization=`Bearer ${Re}`),me},baseURL:(e=I.defaults)===null||e===void 0?void 0:e.baseURL}),agents:ly({axios:V,getSocket:k,appId:a,serverUrl:i,token:u}),appLogs:uy(V,a),users:zC(V,a),analytics:zA({axiosClient:V,serverUrl:i,appId:a,userAuthModule:G}),cleanup:()=>{L.analytics.cleanup(),b&&b.disconnect()}},J={entities:iy({axios:B,appId:a,getSocket:k}),integrations:oy(B,a),sso:FC(B,a),connectors:VC(B,a),functions:ay(K,a,{getAuthHeaders:()=>{const me={};return c&&(me.Authorization=`Bearer ${c}`),me},baseURL:(r=K.defaults)===null||r===void 0?void 0:r.baseURL}),agents:ly({axios:B,getSocket:k,appId:a,serverUrl:i,token:u}),appLogs:uy(B,a),cleanup:()=>{b&&b.disconnect()}};if(typeof window<"u"){const me=u||Cl();me&&L.auth.setToken(me)}return f&&typeof window<"u"&&setTimeout(async()=>{try{await L.auth.isAuthenticated()||L.auth.redirectToLogin(window.location.href)}catch(me){console.error("Authentication check failed:",me),L.auth.redirectToLogin(window.location.href)}},0),{...L,setToken(me){L.auth.setToken(me),b&&b.updateConfig({token:me}),E.token=me},getConfig(){return{serverUrl:i,appId:a,requiresAuth:f}},get asServiceRole(){if(!c)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return J}}}const Tx=typeof window>"u",JA=Tx?{localStorage:new Map}:window,po=JA.localStorage,ZA=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),Fs=(t,{defaultValue:e=void 0,removeFromUrl:r=!1}={})=>{if(Tx)return e;const i=`base44_${ZA(t)}`,a=new URLSearchParams(window.location.search),u=a.get(t);if(r){a.delete(t);const f=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,f)}if(u)return po.setItem(i,u),u;if(e)return po.setItem(i,e),e;const c=po.getItem(i);return c||null},eP=()=>(Fs("clear_access_token")==="true"&&(po.removeItem("base44_access_token"),po.removeItem("token")),{appId:Fs("app_id",{defaultValue:"69c3f0b4fde3b3f47a865a3a"}),token:Fs("access_token",{removeFromUrl:!0}),fromUrl:Fs("from_url",{defaultValue:window.location.href}),functionsVersion:Fs("functions_version",{defaultValue:"prod"}),appBaseUrl:Fs("app_base_url",{defaultValue:void 0})}),ao={...eP()},{appId:tP,token:nP,functionsVersion:rP,appBaseUrl:sP}=ao,lo=XA({appId:tP,token:nP,functionsVersion:rP,serverUrl:"",requiresAuth:!1,appBaseUrl:sP});function iP({}){var a;const e=z0().pathname.substring(1),{data:r,isFetched:i}=lE({queryKey:["user"],queryFn:async()=>{try{return{user:await lo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return y.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:y.jsx("div",{className:"max-w-md w-full",children:y.jsxs("div",{className:"text-center space-y-6",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),y.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),y.jsxs("div",{className:"space-y-3",children:[y.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),y.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",y.jsxs("span",{className:"font-medium text-slate-700",children:['"',e,'"']})," could not be found in this application."]})]}),i&&r.isAuthenticated&&((a=r.user)==null?void 0:a.role)==="admin"&&y.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:y.jsxs("div",{className:"flex items-start space-x-3",children:[y.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:y.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),y.jsxs("div",{className:"text-left space-y-1",children:[y.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),y.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),y.jsx("div",{className:"pt-6",children:y.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[y.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Cx=M.createContext(),oP=({children:t})=>{const[e,r]=M.useState(null),[i,a]=M.useState(!1),[u,c]=M.useState(!0),[f,h]=M.useState(!0),[m,g]=M.useState(null),[v,w]=M.useState(null);M.useEffect(()=>{E()},[]);const E=async()=>{var R,V;try{h(!0),g(null);const I=io({baseURL:"/api/apps/public",headers:{"X-App-Id":ao.appId},token:ao.token,interceptResponses:!0});try{const O=await I.get(`/prod/public-settings/by-id/${ao.appId}`);w(O),ao.token?await b():(c(!1),a(!1)),h(!1)}catch(O){if(console.error("App state check failed:",O),O.status===403&&((V=(R=O.data)==null?void 0:R.extra_data)!=null&&V.reason)){const B=O.data.extra_data.reason;g(B==="auth_required"?{type:"auth_required",message:"Authentication required"}:B==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:B,message:O.message})}else g({type:"unknown",message:O.message||"Failed to load app"});h(!1),c(!1)}}catch(I){console.error("Unexpected error:",I),g({type:"unknown",message:I.message||"An unexpected error occurred"}),h(!1),c(!1)}},b=async()=>{try{c(!0);const R=await lo.auth.me();r(R),a(!0),c(!1)}catch(R){console.error("User auth check failed:",R),c(!1),a(!1),(R.status===401||R.status===403)&&g({type:"auth_required",message:"Authentication required"})}},k=(R=!0)=>{r(null),a(!1),R?lo.auth.logout(window.location.href):lo.auth.logout()},S=()=>{lo.auth.redirectToLogin(window.location.href)};return y.jsx(Cx.Provider,{value:{user:e,isAuthenticated:i,isLoadingAuth:u,isLoadingPublicSettings:f,authError:m,appPublicSettings:v,logout:k,navigateToLogin:S,checkAppState:E},children:t})},aP=()=>{const t=M.useContext(Cx);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},lP=()=>y.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:y.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:y.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),y.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),y.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),y.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[y.jsx("p",{children:"If you believe this is an error, you can:"}),y.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[y.jsx("li",{children:"Verify you are logged in with the correct account"}),y.jsx("li",{children:"Contact the app administrator for access"}),y.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),_f=M.createContext({});function Nf(t){const e=M.useRef(null);return e.current===null&&(e.current=t()),e.current}const Hl=M.createContext(null),jf=M.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class uP extends M.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=r.offsetHeight||0,i.width=r.offsetWidth||0,i.top=r.offsetTop,i.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function cP({children:t,isPresent:e}){const r=M.useId(),i=M.useRef(null),a=M.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=M.useContext(jf);return M.useInsertionEffect(()=>{const{width:c,height:f,top:h,left:m}=a.current;if(e||!i.current||!c||!f)return;i.current.dataset.motionPopId=r;const g=document.createElement("style");return u&&(g.nonce=u),document.head.appendChild(g),g.sheet&&g.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${c}px !important; height: ${f}px !important; top: ${h}px !important; left: ${m}px !important; } `),()=>{document.head.removeChild(g)}},[e]),y.jsx(uP,{isPresent:e,childRef:i,sizeRef:a,children:M.cloneElement(t,{ref:i})})}const dP=({children:t,initial:e,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:u,mode:c})=>{const f=Nf(fP),h=M.useId(),m=M.useCallback(v=>{f.set(v,!0);for(const w of f.values())if(!w)return;i&&i()},[f,i]),g=M.useMemo(()=>({id:h,initial:e,isPresent:r,custom:a,onExitComplete:m,register:v=>(f.set(v,!1),()=>f.delete(v))}),u?[Math.random(),m]:[r,m]);return M.useMemo(()=>{f.forEach((v,w)=>f.set(w,!1))},[r]),M.useEffect(()=>{!r&&!f.size&&i&&i()},[r]),c==="popLayout"&&(t=y.jsx(cP,{isPresent:r,children:t})),y.jsx(Hl.Provider,{value:g,children:t})};function fP(){return new Map}function Ax(t=!0){const e=M.useContext(Hl);if(e===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:a}=e,u=M.useId();M.useEffect(()=>{t&&a(u)},[t]);const c=M.useCallback(()=>t&&i&&i(u),[u,i,t]);return!r&&i?[!1,c]:[!0]}const sl=t=>t.key||"";function Sy(t){const e=[];return M.Children.forEach(t,r=>{M.isValidElement(r)&&e.push(r)}),e}const Of=typeof window<"u",Px=Of?M.useLayoutEffect:M.useEffect,hP=({children:t,custom:e,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:u="sync",propagate:c=!1})=>{const[f,h]=Ax(c),m=M.useMemo(()=>Sy(t),[t]),g=c&&!f?[]:m.map(sl),v=M.useRef(!0),w=M.useRef(m),E=Nf(()=>new Map),[b,k]=M.useState(m),[S,R]=M.useState(m);Px(()=>{v.current=!1,w.current=m;for(let O=0;O{const B=sl(O),K=c&&!f?!1:m===S||g.includes(B),G=()=>{if(E.has(B))E.set(B,!0);else return;let L=!0;E.forEach(J=>{J||(L=!1)}),L&&(I==null||I(),R(w.current),c&&(h==null||h()),i&&i())};return y.jsx(dP,{isPresent:K,initial:!v.current||r?void 0:!1,custom:K?void 0:e,presenceAffectsLayout:a,mode:u,onExitComplete:K?void 0:G,children:O},B)})})},Bt=t=>t;let Rx=Bt;function If(t){let e;return()=>(e===void 0&&(e=t()),e)}const si=(t,e,r)=>{const i=e-t;return i===0?1:(r-t)/i},Vn=t=>t*1e3,Bn=t=>t/1e3,pP={useManualTiming:!1};function mP(t){let e=new Set,r=new Set,i=!1,a=!1;const u=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function f(m){u.has(m)&&(h.schedule(m),t()),m(c)}const h={schedule:(m,g=!1,v=!1)=>{const E=v&&i?e:r;return g&&u.add(m),E.has(m)||E.add(m),m},cancel:m=>{r.delete(m),u.delete(m)},process:m=>{if(c=m,i){a=!0;return}i=!0,[e,r]=[r,e],e.forEach(f),e.clear(),i=!1,a&&(a=!1,h.process(m))}};return h}const il=["read","resolveKeyframes","update","preRender","render","postRender"],gP=40;function _x(t,e){let r=!1,i=!0;const a={delta:0,timestamp:0,isProcessing:!1},u=()=>r=!0,c=il.reduce((R,V)=>(R[V]=mP(u),R),{}),{read:f,resolveKeyframes:h,update:m,preRender:g,render:v,postRender:w}=c,E=()=>{const R=performance.now();r=!1,a.delta=i?1e3/60:Math.max(Math.min(R-a.timestamp,gP),1),a.timestamp=R,a.isProcessing=!0,f.process(a),h.process(a),m.process(a),g.process(a),v.process(a),w.process(a),a.isProcessing=!1,r&&e&&(i=!1,t(E))},b=()=>{r=!0,i=!0,a.isProcessing||t(E)};return{schedule:il.reduce((R,V)=>{const I=c[V];return R[V]=(O,B=!1,K=!1)=>(r||b(),I.schedule(O,B,K)),R},{}),cancel:R=>{for(let V=0;Vby[t].some(r=>!!e[r])};function yP(t){for(const e in t)ii[e]={...ii[e],...t[e]}}const vP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Al(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||vP.has(t)}let jx=t=>!Al(t);function xP(t){t&&(jx=e=>e.startsWith("on")?!Al(e):t(e))}try{xP(require("@emotion/is-prop-valid").default)}catch{}function wP(t,e,r){const i={};for(const a in t)a==="values"&&typeof t.values=="object"||(jx(a)||r===!0&&Al(a)||!e&&!Al(a)||t.draggable&&a.startsWith("onDrag"))&&(i[a]=t[a]);return i}function SP(t){if(typeof Proxy>"u")return t;const e=new Map,r=(...i)=>t(...i);return new Proxy(r,{get:(i,a)=>a==="create"?t:(e.has(a)||e.set(a,t(a)),e.get(a))})}const Wl=M.createContext({});function So(t){return typeof t=="string"||Array.isArray(t)}function ql(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Lf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Df=["initial",...Lf];function Kl(t){return ql(t.animate)||Df.some(e=>So(t[e]))}function Ox(t){return!!(Kl(t)||t.variants)}function bP(t,e){if(Kl(t)){const{initial:r,animate:i}=t;return{initial:r===!1||So(r)?r:void 0,animate:So(i)?i:void 0}}return t.inherit!==!1?e:{}}function kP(t){const{initial:e,animate:r}=bP(t,M.useContext(Wl));return M.useMemo(()=>({initial:e,animate:r}),[ky(e),ky(r)])}function ky(t){return Array.isArray(t)?t.join(" "):t}const EP=Symbol.for("motionComponentSymbol");function Vs(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function TP(t,e,r){return M.useCallback(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),r&&(typeof r=="function"?r(i):Vs(r)&&(r.current=i))},[e])}const Mf=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),CP="framerAppearId",Ix="data-"+Mf(CP),{schedule:Ff}=_x(queueMicrotask,!1),Lx=M.createContext({});function AP(t,e,r,i,a){var u,c;const{visualElement:f}=M.useContext(Wl),h=M.useContext(Nx),m=M.useContext(Hl),g=M.useContext(jf).reducedMotion,v=M.useRef(null);i=i||h.renderer,!v.current&&i&&(v.current=i(t,{visualState:e,parent:f,props:r,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:g}));const w=v.current,E=M.useContext(Lx);w&&!w.projection&&a&&(w.type==="html"||w.type==="svg")&&PP(v.current,r,a,E);const b=M.useRef(!1);M.useInsertionEffect(()=>{w&&b.current&&w.update(r,m)});const k=r[Ix],S=M.useRef(!!k&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,k))&&((c=window.MotionHasOptimisedAnimation)===null||c===void 0?void 0:c.call(window,k)));return Px(()=>{w&&(b.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),Ff.render(w.render),S.current&&w.animationState&&w.animationState.animateChanges())}),M.useEffect(()=>{w&&(!S.current&&w.animationState&&w.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var R;(R=window.MotionHandoffMarkAsComplete)===null||R===void 0||R.call(window,k)}),S.current=!1))}),w}function PP(t,e,r,i){const{layoutId:a,layout:u,drag:c,dragConstraints:f,layoutScroll:h,layoutRoot:m}=e;t.projection=new r(t.latestValues,e["data-framer-portal-id"]?void 0:Dx(t.parent)),t.projection.setOptions({layoutId:a,layout:u,alwaysMeasureLayout:!!c||f&&Vs(f),visualElement:t,animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:h,layoutRoot:m})}function Dx(t){if(t)return t.options.allowProjection!==!1?t.projection:Dx(t.parent)}function RP({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:i,Component:a}){var u,c;t&&yP(t);function f(m,g){let v;const w={...M.useContext(jf),...m,layoutId:_P(m)},{isStatic:E}=w,b=kP(m),k=i(m,E);if(!E&&Of){NP();const S=jP(w);v=S.MeasureLayout,b.visualElement=AP(a,k,w,e,S.ProjectionNode)}return y.jsxs(Wl.Provider,{value:b,children:[v&&b.visualElement?y.jsx(v,{visualElement:b.visualElement,...w}):null,r(a,m,TP(k,b.visualElement,g),k,E,b.visualElement)]})}f.displayName=`motion.${typeof a=="string"?a:`create(${(c=(u=a.displayName)!==null&&u!==void 0?u:a.name)!==null&&c!==void 0?c:""})`}`;const h=M.forwardRef(f);return h[EP]=a,h}function _P({layoutId:t}){const e=M.useContext(_f).id;return e&&t!==void 0?e+"-"+t:t}function NP(t,e){M.useContext(Nx).strict}function jP(t){const{drag:e,layout:r}=ii;if(!e&&!r)return{};const i={...e,...r};return{MeasureLayout:e!=null&&e.isEnabled(t)||r!=null&&r.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const OP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vf(t){return typeof t!="string"||t.includes("-")?!1:!!(OP.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ey(t){const e=[{},{}];return t==null||t.values.forEach((r,i)=>{e[0][i]=r.get(),e[1][i]=r.getVelocity()}),e}function Bf(t,e,r,i){if(typeof e=="function"){const[a,u]=Ey(i);e=e(r!==void 0?r:t.custom,a,u)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[a,u]=Ey(i);e=e(r!==void 0?r:t.custom,a,u)}return e}const Qd=t=>Array.isArray(t),IP=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),LP=t=>Qd(t)?t[t.length-1]||0:t,wt=t=>!!(t&&t.getVelocity);function vl(t){const e=wt(t)?t.get():t;return IP(e)?e.toValue():e}function DP({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:r},i,a,u){const c={latestValues:MP(i,a,u,t),renderState:e()};return r&&(c.onMount=f=>r({props:i,current:f,...c}),c.onUpdate=f=>r(f)),c}const Mx=t=>(e,r)=>{const i=M.useContext(Wl),a=M.useContext(Hl),u=()=>DP(t,e,i,a);return r?u():Nf(u)};function MP(t,e,r,i){const a={},u=i(t,{});for(const w in u)a[w]=vl(u[w]);let{initial:c,animate:f}=t;const h=Kl(t),m=Ox(t);e&&m&&!h&&t.inherit!==!1&&(c===void 0&&(c=e.initial),f===void 0&&(f=e.animate));let g=r?r.initial===!1:!1;g=g||c===!1;const v=g?f:c;if(v&&typeof v!="boolean"&&!ql(v)){const w=Array.isArray(v)?v:[v];for(let E=0;Ee=>typeof e=="string"&&e.startsWith(t),Vx=Fx("--"),FP=Fx("var(--"),Uf=t=>FP(t)?VP.test(t.split("/*")[0].trim()):!1,VP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Bx=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Un=(t,e,r)=>r>e?e:rtypeof t=="number",parse:parseFloat,transform:t=>t},bo={...ci,transform:t=>Un(0,1,t)},ol={...ci,default:1},Fo=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),pr=Fo("deg"),bn=Fo("%"),ce=Fo("px"),BP=Fo("vh"),UP=Fo("vw"),Ty={...bn,parse:t=>bn.parse(t)/100,transform:t=>bn.transform(t*100)},zP={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,backgroundPositionX:ce,backgroundPositionY:ce},$P={rotate:pr,rotateX:pr,rotateY:pr,rotateZ:pr,scale:ol,scaleX:ol,scaleY:ol,scaleZ:ol,skew:pr,skewX:pr,skewY:pr,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:bo,originX:Ty,originY:Ty,originZ:ce},Cy={...ci,transform:Math.round},zf={...zP,...$P,zIndex:Cy,size:ce,fillOpacity:bo,strokeOpacity:bo,numOctaves:Cy},HP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WP=ui.length;function qP(t,e,r){let i="",a=!0;for(let u=0;u({style:{},transform:{},transformOrigin:{},vars:{}}),Ux=()=>({...Wf(),attrs:{}}),qf=t=>typeof t=="string"&&t.toLowerCase()==="svg";function zx(t,{style:e,vars:r},i,a){Object.assign(t.style,e,a&&a.getProjectionStyles(i));for(const u in r)t.style.setProperty(u,r[u])}const $x=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hx(t,e,r,i){zx(t,e,void 0,i);for(const a in e.attrs)t.setAttribute($x.has(a)?a:Mf(a),e.attrs[a])}const Pl={};function XP(t){Object.assign(Pl,t)}function Wx(t,{layout:e,layoutId:r}){return fs.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Pl[t]||t==="opacity")}function Kf(t,e,r){var i;const{style:a}=t,u={};for(const c in a)(wt(a[c])||e.style&&wt(e.style[c])||Wx(c,t)||((i=r==null?void 0:r.getValue(c))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(u[c]=a[c]);return u}function qx(t,e,r){const i=Kf(t,e,r);for(const a in t)if(wt(t[a])||wt(e[a])){const u=ui.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;i[u]=t[a]}return i}function JP(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const Py=["x","y","width","height","cx","cy","r"],ZP={useVisualState:Mx({scrapeMotionValuesFromProps:qx,createRenderState:Ux,onUpdate:({props:t,prevProps:e,current:r,renderState:i,latestValues:a})=>{if(!r)return;let u=!!t.drag;if(!u){for(const f in a)if(fs.has(f)){u=!0;break}}if(!u)return;let c=!e;if(e)for(let f=0;f{JP(r,i),Be.render(()=>{Hf(i,a,qf(r.tagName),t.transformTemplate),Hx(r,i)})})}})},eR={useVisualState:Mx({scrapeMotionValuesFromProps:Kf,createRenderState:Wf})};function Kx(t,e,r){for(const i in e)!wt(e[i])&&!Wx(i,r)&&(t[i]=e[i])}function tR({transformTemplate:t},e){return M.useMemo(()=>{const r=Wf();return $f(r,e,t),Object.assign({},r.vars,r.style)},[e])}function nR(t,e){const r=t.style||{},i={};return Kx(i,r,t),Object.assign(i,tR(t,e)),i}function rR(t,e){const r={},i=nR(t,e);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}function sR(t,e,r,i){const a=M.useMemo(()=>{const u=Ux();return Hf(u,e,qf(i),t.transformTemplate),{...u.attrs,style:{...u.style}}},[e]);if(t.style){const u={};Kx(u,t.style,t),a.style={...u,...a.style}}return a}function iR(t=!1){return(r,i,a,{latestValues:u},c)=>{const h=(Vf(r)?sR:rR)(i,u,c,r),m=wP(i,typeof r=="string",t),g=r!==M.Fragment?{...m,...h,ref:a}:{},{children:v}=i,w=M.useMemo(()=>wt(v)?v.get():v,[v]);return M.createElement(r,{...g,children:w})}}function oR(t,e){return function(i,{forwardMotionProps:a}={forwardMotionProps:!1}){const c={...Vf(i)?ZP:eR,preloadedFeatures:t,useRender:iR(a),createVisualElement:e,Component:i};return RP(c)}}function Qx(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let i=0;iwindow.ScrollTimeline!==void 0);class lR{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,r){for(let i=0;i{if(aR()&&a.attachTimeline)return a.attachTimeline(e);if(typeof r=="function")return r(a)});return()=>{i.forEach((a,u)=>{a&&a(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let r=0;rr[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class uR extends lR{then(e,r){return Promise.all(this.animations).then(e).catch(r)}}function Qf(t,e){return t?t[e]||t.default||t:void 0}const Gd=2e4;function Gx(t){let e=0;const r=50;let i=t.next(e);for(;!i.done&&e=Gd?1/0:e}function Gf(t){return typeof t=="function"}function Ry(t,e){t.timeline=e,t.onfinish=null}const Yf=t=>Array.isArray(t)&&typeof t[0]=="number",cR={linearEasing:void 0};function dR(t,e){const r=If(t);return()=>{var i;return(i=cR[e])!==null&&i!==void 0?i:r()}}const Rl=dR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Yx=(t,e,r=10)=>{let i="";const a=Math.max(Math.round(e/r),2);for(let u=0;u`cubic-bezier(${t}, ${e}, ${r}, ${i})`,Yd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uo([0,.65,.55,1]),circOut:uo([.55,0,1,.45]),backIn:uo([.31,.01,.66,-.59]),backOut:uo([.33,1.53,.69,.99])};function Jx(t,e){if(t)return typeof t=="function"&&Rl()?Yx(t,e):Yf(t)?uo(t):Array.isArray(t)?t.map(r=>Jx(r,e)||Yd.easeOut):Yd[t]}const ln={x:!1,y:!1};function Zx(){return ln.x||ln.y}function fR(t,e,r){var i;if(t instanceof Element)return[t];if(typeof t=="string"){let a=document;const u=(i=void 0)!==null&&i!==void 0?i:a.querySelectorAll(t);return u?Array.from(u):[]}return Array.from(t)}function ew(t,e){const r=fR(t),i=new AbortController,a={passive:!0,...e,signal:i.signal};return[r,a,()=>i.abort()]}function _y(t){return e=>{e.pointerType==="touch"||Zx()||t(e)}}function hR(t,e,r={}){const[i,a,u]=ew(t,r),c=_y(f=>{const{target:h}=f,m=e(f);if(typeof m!="function"||!h)return;const g=_y(v=>{m(v),h.removeEventListener("pointerleave",g)});h.addEventListener("pointerleave",g,a)});return i.forEach(f=>{f.addEventListener("pointerenter",c,a)}),u}const tw=(t,e)=>e?t===e?!0:tw(t,e.parentElement):!1,Xf=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,pR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mR(t){return pR.has(t.tagName)||t.tabIndex!==-1}const co=new WeakSet;function Ny(t){return e=>{e.key==="Enter"&&t(e)}}function ad(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const gR=(t,e)=>{const r=t.currentTarget;if(!r)return;const i=Ny(()=>{if(co.has(r))return;ad(r,"down");const a=Ny(()=>{ad(r,"up")}),u=()=>ad(r,"cancel");r.addEventListener("keyup",a,e),r.addEventListener("blur",u,e)});r.addEventListener("keydown",i,e),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),e)};function jy(t){return Xf(t)&&!Zx()}function yR(t,e,r={}){const[i,a,u]=ew(t,r),c=f=>{const h=f.currentTarget;if(!jy(f)||co.has(h))return;co.add(h);const m=e(f),g=(E,b)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",w),!(!jy(E)||!co.has(h))&&(co.delete(h),typeof m=="function"&&m(E,{success:b}))},v=E=>{g(E,r.useGlobalTarget||tw(h,E.target))},w=E=>{g(E,!1)};window.addEventListener("pointerup",v,a),window.addEventListener("pointercancel",w,a)};return i.forEach(f=>{!mR(f)&&f.getAttribute("tabindex")===null&&(f.tabIndex=0),(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,a),f.addEventListener("focus",m=>gR(m,a),a)}),u}function vR(t){return t==="x"||t==="y"?ln[t]?null:(ln[t]=!0,()=>{ln[t]=!1}):ln.x||ln.y?null:(ln.x=ln.y=!0,()=>{ln.x=ln.y=!1})}const nw=new Set(["width","height","top","left","right","bottom",...ui]);let xl;function xR(){xl=void 0}const kn={now:()=>(xl===void 0&&kn.set(ct.isProcessing||pP.useManualTiming?ct.timestamp:performance.now()),xl),set:t=>{xl=t,queueMicrotask(xR)}};function Jf(t,e){t.indexOf(e)===-1&&t.push(e)}function Zf(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class eh{constructor(){this.subscriptions=[]}add(e){return Jf(this.subscriptions,e),()=>Zf(this.subscriptions,e)}notify(e,r,i){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](e,r,i);else for(let u=0;u!isNaN(parseFloat(t));class SR{constructor(e,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,a=!0)=>{const u=kn.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=r.owner}setCurrent(e){this.current=e,this.updatedAt=kn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=wR(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new eh);const i=this.events[e].add(r);return e==="change"?()=>{i(),Be.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,r=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Oy)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Oy);return rw(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ko(t,e){return new SR(t,e)}function bR(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,ko(r))}function kR(t,e){const r=Ql(t,e);let{transitionEnd:i={},transition:a={},...u}=r||{};u={...u,...i};for(const c in u){const f=LP(u[c]);bR(t,c,f)}}function ER(t){return!!(wt(t)&&t.add)}function Xd(t,e){const r=t.getValue("willChange");if(ER(r))return r.add(e)}function sw(t){return t.props[Ix]}const iw=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,TR=1e-7,CR=12;function AR(t,e,r,i,a){let u,c,f=0;do c=e+(r-e)/2,u=iw(c,i,a)-t,u>0?r=c:e=c;while(Math.abs(u)>TR&&++fAR(u,0,1,t,r);return u=>u===0||u===1?u:iw(a(u),e,i)}const ow=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,aw=t=>e=>1-t(1-e),lw=Vo(.33,1.53,.69,.99),th=aw(lw),uw=ow(th),cw=t=>(t*=2)<1?.5*th(t):.5*(2-Math.pow(2,-10*(t-1))),nh=t=>1-Math.sin(Math.acos(t)),dw=aw(nh),fw=ow(nh),hw=t=>/^0[^.\s]+$/u.test(t);function PR(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||hw(t):!0}const mo=t=>Math.round(t*1e5)/1e5,rh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function RR(t){return t==null}const _R=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sh=(t,e)=>r=>!!(typeof r=="string"&&_R.test(r)&&r.startsWith(t)||e&&!RR(r)&&Object.prototype.hasOwnProperty.call(r,e)),pw=(t,e,r)=>i=>{if(typeof i!="string")return i;const[a,u,c,f]=i.match(rh);return{[t]:parseFloat(a),[e]:parseFloat(u),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},NR=t=>Un(0,255,t),ld={...ci,transform:t=>Math.round(NR(t))},Xr={test:sh("rgb","red"),parse:pw("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:i=1})=>"rgba("+ld.transform(t)+", "+ld.transform(e)+", "+ld.transform(r)+", "+mo(bo.transform(i))+")"};function jR(t){let e="",r="",i="",a="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),i=t.substring(5,7),a=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),i=t.substring(3,4),a=t.substring(4,5),e+=e,r+=r,i+=i,a+=a),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:a?parseInt(a,16)/255:1}}const Jd={test:sh("#"),parse:jR,transform:Xr.transform},Bs={test:sh("hsl","hue"),parse:pw("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:i=1})=>"hsla("+Math.round(t)+", "+bn.transform(mo(e))+", "+bn.transform(mo(r))+", "+mo(bo.transform(i))+")"},vt={test:t=>Xr.test(t)||Jd.test(t)||Bs.test(t),parse:t=>Xr.test(t)?Xr.parse(t):Bs.test(t)?Bs.parse(t):Jd.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Xr.transform(t):Bs.transform(t)},OR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IR(t){var e,r;return isNaN(t)&&typeof t=="string"&&(((e=t.match(rh))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(OR))===null||r===void 0?void 0:r.length)||0)>0}const mw="number",gw="color",LR="var",DR="var(",Iy="${}",MR=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Eo(t){const e=t.toString(),r=[],i={color:[],number:[],var:[]},a=[];let u=0;const f=e.replace(MR,h=>(vt.test(h)?(i.color.push(u),a.push(gw),r.push(vt.parse(h))):h.startsWith(DR)?(i.var.push(u),a.push(LR),r.push(h)):(i.number.push(u),a.push(mw),r.push(parseFloat(h))),++u,Iy)).split(Iy);return{values:r,split:f,indexes:i,types:a}}function yw(t){return Eo(t).values}function vw(t){const{split:e,types:r}=Eo(t),i=e.length;return a=>{let u="";for(let c=0;ctypeof t=="number"?0:t;function VR(t){const e=yw(t);return vw(t)(e.map(FR))}const Ar={test:IR,parse:yw,createTransformer:vw,getAnimatableNone:VR},BR=new Set(["brightness","contrast","saturate","opacity"]);function UR(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=r.match(rh)||[];if(!i)return t;const a=r.replace(i,"");let u=BR.has(e)?1:0;return i!==r&&(u*=100),e+"("+u+a+")"}const zR=/\b([a-z-]*)\(.*?\)/gu,Zd={...Ar,getAnimatableNone:t=>{const e=t.match(zR);return e?e.map(UR).join(" "):t}},$R={...zf,color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:Zd,WebkitFilter:Zd},ih=t=>$R[t];function xw(t,e){let r=ih(t);return r!==Zd&&(r=Ar),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const HR=new Set(["auto","none","0"]);function WR(t,e,r){let i=0,a;for(;it===ci||t===ce,Dy=(t,e)=>parseFloat(t.split(", ")[e]),My=(t,e)=>(r,{transform:i})=>{if(i==="none"||!i)return 0;const a=i.match(/^matrix3d\((.+)\)$/u);if(a)return Dy(a[1],e);{const u=i.match(/^matrix\((.+)\)$/u);return u?Dy(u[1],t):0}},qR=new Set(["x","y","z"]),KR=ui.filter(t=>!qR.has(t));function QR(t){const e=[];return KR.forEach(r=>{const i=t.getValue(r);i!==void 0&&(e.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),e}const oi={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:My(4,13),y:My(5,14)};oi.translateX=oi.x;oi.translateY=oi.y;const ls=new Set;let ef=!1,tf=!1;function ww(){if(tf){const t=Array.from(ls).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),r=new Map;e.forEach(i=>{const a=QR(i);a.length&&(r.set(i,a),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const a=r.get(i);a&&a.forEach(([u,c])=>{var f;(f=i.getValue(u))===null||f===void 0||f.set(c)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}tf=!1,ef=!1,ls.forEach(t=>t.complete()),ls.clear()}function Sw(){ls.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tf=!0)})}function GR(){Sw(),ww()}class oh{constructor(e,r,i,a,u,c=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=i,this.motionValue=a,this.element=u,this.isAsync=c}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ls.add(this),ef||(ef=!0,Be.read(Sw),Be.resolveKeyframes(ww))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:r,element:i,motionValue:a}=this;for(let u=0;u/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),YR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function XR(t){const e=YR.exec(t);if(!e)return[,];const[,r,i,a]=e;return[`--${r??i}`,a]}function kw(t,e,r=1){const[i,a]=XR(t);if(!i)return;const u=window.getComputedStyle(e).getPropertyValue(i);if(u){const c=u.trim();return bw(c)?parseFloat(c):c}return Uf(a)?kw(a,e,r+1):a}const Ew=t=>e=>e.test(t),JR={test:t=>t==="auto",parse:t=>t},Tw=[ci,ce,bn,pr,UP,BP,JR],Fy=t=>Tw.find(Ew(t));class Cw extends oh{constructor(e,r,i,a,u){super(e,r,i,a,u,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let h=0;h{r.getValue(h).set(m)}),this.resolveNoneKeyframes()}}const Vy=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ar.test(t)||t==="0")&&!t.startsWith("url("));function ZR(t){const e=t[0];if(t.length===1)return!0;for(let r=0;rt!==null;function Gl(t,{repeat:e,repeatType:r="loop"},i){const a=t.filter(t_),u=e&&r!=="loop"&&e%2===1?0:a.length-1;return!u||i===void 0?a[u]:i}const n_=40;class Aw{constructor({autoplay:e=!0,delay:r=0,type:i="keyframes",repeat:a=0,repeatDelay:u=0,repeatType:c="loop",...f}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=kn.now(),this.options={autoplay:e,delay:r,type:i,repeat:a,repeatDelay:u,repeatType:c,...f},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>n_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&GR(),this._resolved}onKeyframesResolved(e,r){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:i,type:a,velocity:u,delay:c,onComplete:f,onUpdate:h,isGenerator:m}=this.options;if(!m&&!e_(e,i,a,u))if(c)this.options.duration=0;else{h&&h(Gl(e,this.options,r)),f&&f(),this.resolveFinishedPromise();return}const g=this.initPlayback(e,r);g!==!1&&(this._resolved={keyframes:e,finalKeyframe:r,...g},this.onPostResolved())}onPostResolved(){}then(e,r){return this.currentFinishedPromise.then(e,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const He=(t,e,r)=>t+(e-t)*r;function ud(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function r_({hue:t,saturation:e,lightness:r,alpha:i}){t/=360,e/=100,r/=100;let a=0,u=0,c=0;if(!e)a=u=c=r;else{const f=r<.5?r*(1+e):r+e-r*e,h=2*r-f;a=ud(h,f,t+1/3),u=ud(h,f,t),c=ud(h,f,t-1/3)}return{red:Math.round(a*255),green:Math.round(u*255),blue:Math.round(c*255),alpha:i}}function _l(t,e){return r=>r>0?e:t}const cd=(t,e,r)=>{const i=t*t,a=r*(e*e-i)+i;return a<0?0:Math.sqrt(a)},s_=[Jd,Xr,Bs],i_=t=>s_.find(e=>e.test(t));function By(t){const e=i_(t);if(!e)return!1;let r=e.parse(t);return e===Bs&&(r=r_(r)),r}const Uy=(t,e)=>{const r=By(t),i=By(e);if(!r||!i)return _l(t,e);const a={...r};return u=>(a.red=cd(r.red,i.red,u),a.green=cd(r.green,i.green,u),a.blue=cd(r.blue,i.blue,u),a.alpha=He(r.alpha,i.alpha,u),Xr.transform(a))},o_=(t,e)=>r=>e(t(r)),Bo=(...t)=>t.reduce(o_),nf=new Set(["none","hidden"]);function a_(t,e){return nf.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}function l_(t,e){return r=>He(t,e,r)}function ah(t){return typeof t=="number"?l_:typeof t=="string"?Uf(t)?_l:vt.test(t)?Uy:d_:Array.isArray(t)?Pw:typeof t=="object"?vt.test(t)?Uy:u_:_l}function Pw(t,e){const r=[...t],i=r.length,a=t.map((u,c)=>ah(u)(u,e[c]));return u=>{for(let c=0;c{for(const u in i)r[u]=i[u](a);return r}}function c_(t,e){var r;const i=[],a={color:0,var:0,number:0};for(let u=0;u{const r=Ar.createTransformer(e),i=Eo(t),a=Eo(e);return i.indexes.var.length===a.indexes.var.length&&i.indexes.color.length===a.indexes.color.length&&i.indexes.number.length>=a.indexes.number.length?nf.has(t)&&!a.values.length||nf.has(e)&&!i.values.length?a_(t,e):Bo(Pw(c_(i,a),a.values),r):_l(t,e)};function Rw(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?He(t,e,r):ah(t)(t,e)}const f_=5;function _w(t,e,r){const i=Math.max(e-f_,0);return rw(r-t(i),e-i)}const Ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},dd=.001;function h_({duration:t=Ke.duration,bounce:e=Ke.bounce,velocity:r=Ke.velocity,mass:i=Ke.mass}){let a,u,c=1-e;c=Un(Ke.minDamping,Ke.maxDamping,c),t=Un(Ke.minDuration,Ke.maxDuration,Bn(t)),c<1?(a=m=>{const g=m*c,v=g*t,w=g-r,E=rf(m,c),b=Math.exp(-v);return dd-w/E*b},u=m=>{const v=m*c*t,w=v*r+r,E=Math.pow(c,2)*Math.pow(m,2)*t,b=Math.exp(-v),k=rf(Math.pow(m,2),c);return(-a(m)+dd>0?-1:1)*((w-E)*b)/k}):(a=m=>{const g=Math.exp(-m*t),v=(m-r)*t+1;return-dd+g*v},u=m=>{const g=Math.exp(-m*t),v=(r-m)*(t*t);return g*v});const f=5/t,h=m_(a,u,f);if(t=Vn(t),isNaN(h))return{stiffness:Ke.stiffness,damping:Ke.damping,duration:t};{const m=Math.pow(h,2)*i;return{stiffness:m,damping:c*2*Math.sqrt(i*m),duration:t}}}const p_=12;function m_(t,e,r){let i=r;for(let a=1;at[r]!==void 0)}function v_(t){let e={velocity:Ke.velocity,stiffness:Ke.stiffness,damping:Ke.damping,mass:Ke.mass,isResolvedFromDuration:!1,...t};if(!zy(t,y_)&&zy(t,g_))if(t.visualDuration){const r=t.visualDuration,i=2*Math.PI/(r*1.2),a=i*i,u=2*Un(.05,1,1-(t.bounce||0))*Math.sqrt(a);e={...e,mass:Ke.mass,stiffness:a,damping:u}}else{const r=h_(t);e={...e,...r,mass:Ke.mass},e.isResolvedFromDuration=!0}return e}function Nw(t=Ke.visualDuration,e=Ke.bounce){const r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:a}=r;const u=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:u},{stiffness:h,damping:m,mass:g,duration:v,velocity:w,isResolvedFromDuration:E}=v_({...r,velocity:-Bn(r.velocity||0)}),b=w||0,k=m/(2*Math.sqrt(h*g)),S=c-u,R=Bn(Math.sqrt(h/g)),V=Math.abs(S)<5;i||(i=V?Ke.restSpeed.granular:Ke.restSpeed.default),a||(a=V?Ke.restDelta.granular:Ke.restDelta.default);let I;if(k<1){const B=rf(R,k);I=K=>{const G=Math.exp(-k*R*K);return c-G*((b+k*R*S)/B*Math.sin(B*K)+S*Math.cos(B*K))}}else if(k===1)I=B=>c-Math.exp(-R*B)*(S+(b+R*S)*B);else{const B=R*Math.sqrt(k*k-1);I=K=>{const G=Math.exp(-k*R*K),L=Math.min(B*K,300);return c-G*((b+k*R*S)*Math.sinh(L)+B*S*Math.cosh(L))/B}}const O={calculatedDuration:E&&v||null,next:B=>{const K=I(B);if(E)f.done=B>=v;else{let G=0;k<1&&(G=B===0?Vn(b):_w(I,B,K));const L=Math.abs(G)<=i,J=Math.abs(c-K)<=a;f.done=L&&J}return f.value=f.done?c:K,f},toString:()=>{const B=Math.min(Gx(O),Gd),K=Yx(G=>O.next(B*G).value,B,30);return B+"ms "+K}};return O}function $y({keyframes:t,velocity:e=0,power:r=.8,timeConstant:i=325,bounceDamping:a=10,bounceStiffness:u=500,modifyTarget:c,min:f,max:h,restDelta:m=.5,restSpeed:g}){const v=t[0],w={done:!1,value:v},E=L=>f!==void 0&&Lh,b=L=>f===void 0?h:h===void 0||Math.abs(f-L)-k*Math.exp(-L/i),I=L=>R+V(L),O=L=>{const J=V(L),de=I(L);w.done=Math.abs(J)<=m,w.value=w.done?R:de};let B,K;const G=L=>{E(w.value)&&(B=L,K=Nw({keyframes:[w.value,b(w.value)],velocity:_w(I,L,w.value),damping:a,stiffness:u,restDelta:m,restSpeed:g}))};return G(0),{calculatedDuration:null,next:L=>{let J=!1;return!K&&B===void 0&&(J=!0,O(L),G(L)),B!==void 0&&L>=B?K.next(L-B):(!J&&O(L),w)}}}const x_=Vo(.42,0,1,1),w_=Vo(0,0,.58,1),jw=Vo(.42,0,.58,1),S_=t=>Array.isArray(t)&&typeof t[0]!="number",b_={linear:Bt,easeIn:x_,easeInOut:jw,easeOut:w_,circIn:nh,circInOut:fw,circOut:dw,backIn:th,backInOut:uw,backOut:lw,anticipate:cw},Hy=t=>{if(Yf(t)){Rx(t.length===4);const[e,r,i,a]=t;return Vo(e,r,i,a)}else if(typeof t=="string")return b_[t];return t};function k_(t,e,r){const i=[],a=r||Rw,u=t.length-1;for(let c=0;ce[0];if(u===2&&e[0]===e[1])return()=>e[1];const c=t[0]===t[1];t[0]>t[u-1]&&(t=[...t].reverse(),e=[...e].reverse());const f=k_(e,i,a),h=f.length,m=g=>{if(c&&g1)for(;vm(Un(t[0],t[u-1],g)):m}function T_(t,e){const r=t[t.length-1];for(let i=1;i<=e;i++){const a=si(0,e,i);t.push(He(r,1,a))}}function C_(t){const e=[0];return T_(e,t.length-1),e}function A_(t,e){return t.map(r=>r*e)}function P_(t,e){return t.map(()=>e||jw).splice(0,t.length-1)}function Nl({duration:t=300,keyframes:e,times:r,ease:i="easeInOut"}){const a=S_(i)?i.map(Hy):Hy(i),u={done:!1,value:e[0]},c=A_(r&&r.length===e.length?r:C_(e),t),f=E_(c,e,{ease:Array.isArray(a)?a:P_(e,a)});return{calculatedDuration:t,next:h=>(u.value=f(h),u.done=h>=t,u)}}const R_=t=>{const e=({timestamp:r})=>t(r);return{start:()=>Be.update(e,!0),stop:()=>Cr(e),now:()=>ct.isProcessing?ct.timestamp:kn.now()}},__={decay:$y,inertia:$y,tween:Nl,keyframes:Nl,spring:Nw},N_=t=>t/100;class lh extends Aw{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:h}=this.options;h&&h()};const{name:r,motionValue:i,element:a,keyframes:u}=this.options,c=(a==null?void 0:a.KeyframeResolver)||oh,f=(h,m)=>this.onKeyframesResolved(h,m);this.resolver=new c(u,f,r,i,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:u,velocity:c=0}=this.options,f=Gf(r)?r:__[r]||Nl;let h,m;f!==Nl&&typeof e[0]!="number"&&(h=Bo(N_,Rw(e[0],e[1])),e=[0,100]);const g=f({...this.options,keyframes:e});u==="mirror"&&(m=f({...this.options,keyframes:[...e].reverse(),velocity:-c})),g.calculatedDuration===null&&(g.calculatedDuration=Gx(g));const{calculatedDuration:v}=g,w=v+a,E=w*(i+1)-a;return{generator:g,mirroredGenerator:m,mapPercentToKeyframes:h,calculatedDuration:v,resolvedDuration:w,totalDuration:E}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,r=!1){const{resolved:i}=this;if(!i){const{keyframes:L}=this.options;return{done:!0,value:L[L.length-1]}}const{finalKeyframe:a,generator:u,mirroredGenerator:c,mapPercentToKeyframes:f,keyframes:h,calculatedDuration:m,totalDuration:g,resolvedDuration:v}=i;if(this.startTime===null)return u.next(0);const{delay:w,repeat:E,repeatType:b,repeatDelay:k,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-g/this.speed,this.startTime)),r?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const R=this.currentTime-w*(this.speed>=0?1:-1),V=this.speed>=0?R<0:R>g;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let I=this.currentTime,O=u;if(E){const L=Math.min(this.currentTime,g)/v;let J=Math.floor(L),de=L%1;!de&&L>=1&&(de=1),de===1&&J--,J=Math.min(J,E+1),!!(J%2)&&(b==="reverse"?(de=1-de,k&&(de-=k/v)):b==="mirror"&&(O=c)),I=Un(0,1,de)*v}const B=V?{done:!1,value:h[0]}:O.next(I);f&&(B.value=f(B.value));let{done:K}=B;!V&&m!==null&&(K=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&K);return G&&a!==void 0&&(B.value=Gl(h,this.options,a)),S&&S(B.value),G&&this.finish(),B}get duration(){const{resolved:e}=this;return e?Bn(e.calculatedDuration):0}get time(){return Bn(this.currentTime)}set time(e){e=Vn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const r=this.playbackSpeed!==e;this.playbackSpeed=e,r&&(this.time=Bn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=R_,onPlay:r,startTime:i}=this.options;this.driver||(this.driver=e(u=>this.tick(u))),r&&r();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const j_=new Set(["opacity","clipPath","filter","transform"]);function O_(t,e,r,{delay:i=0,duration:a=300,repeat:u=0,repeatType:c="loop",ease:f="easeInOut",times:h}={}){const m={[e]:r};h&&(m.offset=h);const g=Jx(f,a);return Array.isArray(g)&&(m.easing=g),t.animate(m,{delay:i,duration:a,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:u+1,direction:c==="reverse"?"alternate":"normal"})}const I_=If(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),jl=10,L_=2e4;function D_(t){return Gf(t.type)||t.type==="spring"||!Xx(t.ease)}function M_(t,e){const r=new lh({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const a=[];let u=0;for(;!i.done&&uthis.onKeyframesResolved(c,f),r,i,a),this.resolver.scheduleResolve()}initPlayback(e,r){let{duration:i=300,times:a,ease:u,type:c,motionValue:f,name:h,startTime:m}=this.options;if(!f.owner||!f.owner.current)return!1;if(typeof u=="string"&&Rl()&&F_(u)&&(u=Ow[u]),D_(this.options)){const{onComplete:v,onUpdate:w,motionValue:E,element:b,...k}=this.options,S=M_(e,k);e=S.keyframes,e.length===1&&(e[1]=e[0]),i=S.duration,a=S.times,u=S.ease,c="keyframes"}const g=O_(f.owner.current,h,e,{...this.options,duration:i,times:a,ease:u});return g.startTime=m??this.calcStartTime(),this.pendingTimeline?(Ry(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:v}=this.options;f.set(Gl(e,this.options,r)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:i,times:a,type:c,ease:u,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:r}=e;return Bn(r)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:r}=e;return Bn(r.currentTime||0)}set time(e){const{resolved:r}=this;if(!r)return;const{animation:i}=r;i.currentTime=Vn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:r}=e;return r.playbackRate}set speed(e){const{resolved:r}=this;if(!r)return;const{animation:i}=r;i.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:r}=e;return r.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:r}=e;return r.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:r}=this;if(!r)return Bt;const{animation:i}=r;Ry(i,e)}return Bt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:r}=e;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:r}=e;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:r,keyframes:i,duration:a,type:u,ease:c,times:f}=e;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:m,onUpdate:g,onComplete:v,element:w,...E}=this.options,b=new lh({...E,keyframes:i,duration:a,type:u,ease:c,times:f,isGenerator:!0}),k=Vn(this.time);m.setWithVelocity(b.sample(k-jl).value,b.sample(k).value,jl)}const{onStop:h}=this.options;h&&h(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:r,name:i,repeatDelay:a,repeatType:u,damping:c,type:f}=e;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:m}=r.owner.getProps();return I_()&&i&&j_.has(i)&&!h&&!m&&!a&&u!=="mirror"&&c!==0&&f!=="inertia"}}const V_={type:"spring",stiffness:500,damping:25,restSpeed:10},B_=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),U_={type:"keyframes",duration:.8},z_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$_=(t,{keyframes:e})=>e.length>2?U_:fs.has(t)?t.startsWith("scale")?B_(e[1]):V_:z_;function H_({when:t,delay:e,delayChildren:r,staggerChildren:i,staggerDirection:a,repeat:u,repeatType:c,repeatDelay:f,from:h,elapsed:m,...g}){return!!Object.keys(g).length}const uh=(t,e,r,i={},a,u)=>c=>{const f=Qf(i,t)||{},h=f.delay||i.delay||0;let{elapsed:m=0}=i;m=m-Vn(h);let g={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:e.getVelocity(),...f,delay:-m,onUpdate:w=>{e.set(w),f.onUpdate&&f.onUpdate(w)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:t,motionValue:e,element:u?void 0:a};H_(f)||(g={...g,...$_(t,g)}),g.duration&&(g.duration=Vn(g.duration)),g.repeatDelay&&(g.repeatDelay=Vn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let v=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(v=!0)),v&&!u&&e.get()!==void 0){const w=Gl(g.keyframes,f);if(w!==void 0)return Be.update(()=>{g.onUpdate(w),g.onComplete()}),new uR([])}return!u&&Wy.supports(g)?new Wy(g):new lh(g)};function W_({protectedKeys:t,needsAnimating:e},r){const i=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,i}function Iw(t,e,{delay:r=0,transitionOverride:i,type:a}={}){var u;let{transition:c=t.getDefaultTransition(),transitionEnd:f,...h}=e;i&&(c=i);const m=[],g=a&&t.animationState&&t.animationState.getState()[a];for(const v in h){const w=t.getValue(v,(u=t.latestValues[v])!==null&&u!==void 0?u:null),E=h[v];if(E===void 0||g&&W_(g,v))continue;const b={delay:r,...Qf(c||{},v)};let k=!1;if(window.MotionHandoffAnimation){const R=sw(t);if(R){const V=window.MotionHandoffAnimation(R,v,Be);V!==null&&(b.startTime=V,k=!0)}}Xd(t,v),w.start(uh(v,w,E,t.shouldReduceMotion&&nw.has(v)?{type:!1}:b,t,k));const S=w.animation;S&&m.push(S)}return f&&Promise.all(m).then(()=>{Be.update(()=>{f&&kR(t,f)})}),m}function sf(t,e,r={}){var i;const a=Ql(t,e,r.type==="exit"?(i=t.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:u=t.getDefaultTransition()||{}}=a||{};r.transitionOverride&&(u=r.transitionOverride);const c=a?()=>Promise.all(Iw(t,a,r)):()=>Promise.resolve(),f=t.variantChildren&&t.variantChildren.size?(m=0)=>{const{delayChildren:g=0,staggerChildren:v,staggerDirection:w}=u;return q_(t,e,g+m,v,w,r)}:()=>Promise.resolve(),{when:h}=u;if(h){const[m,g]=h==="beforeChildren"?[c,f]:[f,c];return m().then(()=>g())}else return Promise.all([c(),f(r.delay)])}function q_(t,e,r=0,i=0,a=1,u){const c=[],f=(t.variantChildren.size-1)*i,h=a===1?(m=0)=>m*i:(m=0)=>f-m*i;return Array.from(t.variantChildren).sort(K_).forEach((m,g)=>{m.notify("AnimationStart",e),c.push(sf(m,e,{...u,delay:r+h(g)}).then(()=>m.notify("AnimationComplete",e)))}),Promise.all(c)}function K_(t,e){return t.sortNodePosition(e)}function Q_(t,e,r={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const a=e.map(u=>sf(t,u,r));i=Promise.all(a)}else if(typeof e=="string")i=sf(t,e,r);else{const a=typeof e=="function"?Ql(t,e,r.custom):e;i=Promise.all(Iw(t,a,r))}return i.then(()=>{t.notify("AnimationComplete",e)})}const G_=Df.length;function Lw(t){if(!t)return;if(!t.isControllingVariants){const r=t.parent?Lw(t.parent)||{}:{};return t.props.initial!==void 0&&(r.initial=t.props.initial),r}const e={};for(let r=0;rPromise.all(e.map(({animation:r,options:i})=>Q_(t,r,i)))}function Z_(t){let e=J_(t),r=qy(),i=!0;const a=h=>(m,g)=>{var v;const w=Ql(t,g,h==="exit"?(v=t.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(w){const{transition:E,transitionEnd:b,...k}=w;m={...m,...k,...b}}return m};function u(h){e=h(t)}function c(h){const{props:m}=t,g=Lw(t.parent)||{},v=[],w=new Set;let E={},b=1/0;for(let S=0;Sb&&O,J=!1;const de=Array.isArray(I)?I:[I];let me=de.reduce(a(R),{});B===!1&&(me={});const{prevResolvedValues:Re={}}=V,Ie={...Re,...me},_e=fe=>{L=!0,w.has(fe)&&(J=!0,w.delete(fe)),V.needsAnimating[fe]=!0;const q=t.getValue(fe);q&&(q.liveStyle=!1)};for(const fe in Ie){const q=me[fe],se=Re[fe];if(E.hasOwnProperty(fe))continue;let U=!1;Qd(q)&&Qd(se)?U=!Qx(q,se):U=q!==se,U?q!=null?_e(fe):w.add(fe):q!==void 0&&w.has(fe)?_e(fe):V.protectedKeys[fe]=!0}V.prevProp=I,V.prevResolvedValues=me,V.isActive&&(E={...E,...me}),i&&t.blockInitialAnimation&&(L=!1),L&&(!(K&&G)||J)&&v.push(...de.map(fe=>({animation:fe,options:{type:R}})))}if(w.size){const S={};w.forEach(R=>{const V=t.getBaseTarget(R),I=t.getValue(R);I&&(I.liveStyle=!0),S[R]=V??null}),v.push({animation:S})}let k=!!v.length;return i&&(m.initial===!1||m.initial===m.animate)&&!t.manuallyAnimateOnMount&&(k=!1),i=!1,k?e(v):Promise.resolve()}function f(h,m){var g;if(r[h].isActive===m)return Promise.resolve();(g=t.variantChildren)===null||g===void 0||g.forEach(w=>{var E;return(E=w.animationState)===null||E===void 0?void 0:E.setActive(h,m)}),r[h].isActive=m;const v=c(h);for(const w in r)r[w].protectedKeys={};return v}return{animateChanges:c,setActive:f,setAnimateFunction:u,getState:()=>r,reset:()=>{r=qy(),i=!0}}}function eN(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Qx(e,t):!1}function qr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qy(){return{animate:qr(!0),whileInView:qr(),whileHover:qr(),whileTap:qr(),whileDrag:qr(),whileFocus:qr(),exit:qr()}}class _r{constructor(e){this.isMounted=!1,this.node=e}update(){}}class tN extends _r{constructor(e){super(e),e.animationState||(e.animationState=Z_(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ql(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let nN=0;class rN extends _r{constructor(){super(...arguments),this.id=nN++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const a=this.node.animationState.setActive("exit",!e);r&&!e&&a.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const sN={animation:{Feature:tN},exit:{Feature:rN}};function To(t,e,r,i={passive:!0}){return t.addEventListener(e,r,i),()=>t.removeEventListener(e,r)}function Uo(t){return{point:{x:t.pageX,y:t.pageY}}}const iN=t=>e=>Xf(e)&&t(e,Uo(e));function go(t,e,r,i){return To(t,e,iN(r),i)}const Ky=(t,e)=>Math.abs(t-e);function oN(t,e){const r=Ky(t.x,e.x),i=Ky(t.y,e.y);return Math.sqrt(r**2+i**2)}class Dw{constructor(e,r,{transformPagePoint:i,contextWindow:a,dragSnapToOrigin:u=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=hd(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,E=oN(v.offset,{x:0,y:0})>=3;if(!w&&!E)return;const{point:b}=v,{timestamp:k}=ct;this.history.push({...b,timestamp:k});const{onStart:S,onMove:R}=this.handlers;w||(S&&S(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=fd(w,this.transformPagePoint),Be.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:E,onSessionEnd:b,resumeAnimation:k}=this.handlers;if(this.dragSnapToOrigin&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=hd(v.type==="pointercancel"?this.lastMoveEventInfo:fd(w,this.transformPagePoint),this.history);this.startEvent&&E&&E(v,S),b&&b(v,S)},!Xf(e))return;this.dragSnapToOrigin=u,this.handlers=r,this.transformPagePoint=i,this.contextWindow=a||window;const c=Uo(e),f=fd(c,this.transformPagePoint),{point:h}=f,{timestamp:m}=ct;this.history=[{...h,timestamp:m}];const{onSessionStart:g}=r;g&&g(e,hd(f,this.history)),this.removeListeners=Bo(go(this.contextWindow,"pointermove",this.handlePointerMove),go(this.contextWindow,"pointerup",this.handlePointerUp),go(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Cr(this.updatePoint)}}function fd(t,e){return e?{point:e(t.point)}:t}function Qy(t,e){return{x:t.x-e.x,y:t.y-e.y}}function hd({point:t},e){return{point:t,delta:Qy(t,Mw(e)),offset:Qy(t,aN(e)),velocity:lN(e,.1)}}function aN(t){return t[0]}function Mw(t){return t[t.length-1]}function lN(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,i=null;const a=Mw(t);for(;r>=0&&(i=t[r],!(a.timestamp-i.timestamp>Vn(e)));)r--;if(!i)return{x:0,y:0};const u=Bn(a.timestamp-i.timestamp);if(u===0)return{x:0,y:0};const c={x:(a.x-i.x)/u,y:(a.y-i.y)/u};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}const Fw=1e-4,uN=1-Fw,cN=1+Fw,Vw=.01,dN=0-Vw,fN=0+Vw;function Ut(t){return t.max-t.min}function hN(t,e,r){return Math.abs(t-e)<=r}function Gy(t,e,r,i=.5){t.origin=i,t.originPoint=He(e.min,e.max,t.origin),t.scale=Ut(r)/Ut(e),t.translate=He(r.min,r.max,t.origin)-t.originPoint,(t.scale>=uN&&t.scale<=cN||isNaN(t.scale))&&(t.scale=1),(t.translate>=dN&&t.translate<=fN||isNaN(t.translate))&&(t.translate=0)}function yo(t,e,r,i){Gy(t.x,e.x,r.x,i?i.originX:void 0),Gy(t.y,e.y,r.y,i?i.originY:void 0)}function Yy(t,e,r){t.min=r.min+e.min,t.max=t.min+Ut(e)}function pN(t,e,r){Yy(t.x,e.x,r.x),Yy(t.y,e.y,r.y)}function Xy(t,e,r){t.min=e.min-r.min,t.max=t.min+Ut(e)}function vo(t,e,r){Xy(t.x,e.x,r.x),Xy(t.y,e.y,r.y)}function mN(t,{min:e,max:r},i){return e!==void 0&&tr&&(t=i?He(r,t,i.max):Math.min(t,r)),t}function Jy(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function gN(t,{top:e,left:r,bottom:i,right:a}){return{x:Jy(t.x,r,a),y:Jy(t.y,e,i)}}function Zy(t,e){let r=e.min-t.min,i=e.max-t.max;return e.max-e.mini?r=si(e.min,e.max-i,t.min):i>a&&(r=si(t.min,t.max-a,e.min)),Un(0,1,r)}function xN(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const of=.35;function wN(t=of){return t===!1?t=0:t===!0&&(t=of),{x:ev(t,"left","right"),y:ev(t,"top","bottom")}}function ev(t,e,r){return{min:tv(t,e),max:tv(t,r)}}function tv(t,e){return typeof t=="number"?t:t[e]||0}const nv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Us=()=>({x:nv(),y:nv()}),rv=()=>({min:0,max:0}),Ye=()=>({x:rv(),y:rv()});function Yt(t){return[t("x"),t("y")]}function Bw({top:t,left:e,right:r,bottom:i}){return{x:{min:e,max:r},y:{min:t,max:i}}}function SN({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bN(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function pd(t){return t===void 0||t===1}function af({scale:t,scaleX:e,scaleY:r}){return!pd(t)||!pd(e)||!pd(r)}function Kr(t){return af(t)||Uw(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Uw(t){return sv(t.x)||sv(t.y)}function sv(t){return t&&t!=="0%"}function Ol(t,e,r){const i=t-r,a=e*i;return r+a}function iv(t,e,r,i,a){return a!==void 0&&(t=Ol(t,a,i)),Ol(t,r,i)+e}function lf(t,e=0,r=1,i,a){t.min=iv(t.min,e,r,i,a),t.max=iv(t.max,e,r,i,a)}function zw(t,{x:e,y:r}){lf(t.x,e.translate,e.scale,e.originPoint),lf(t.y,r.translate,r.scale,r.originPoint)}const ov=.999999999999,av=1.0000000000001;function kN(t,e,r,i=!1){const a=r.length;if(!a)return;e.x=e.y=1;let u,c;for(let f=0;fov&&(e.x=1),e.yov&&(e.y=1)}function zs(t,e){t.min=t.min+e,t.max=t.max+e}function lv(t,e,r,i,a=.5){const u=He(t.min,t.max,a);lf(t,e,r,u,i)}function $s(t,e){lv(t.x,e.x,e.scaleX,e.scale,e.originX),lv(t.y,e.y,e.scaleY,e.scale,e.originY)}function $w(t,e){return Bw(bN(t.getBoundingClientRect(),e))}function EN(t,e,r){const i=$w(t,r),{scroll:a}=e;return a&&(zs(i.x,a.offset.x),zs(i.y,a.offset.y)),i}const Hw=({current:t})=>t?t.ownerDocument.defaultView:null,TN=new WeakMap;class CN{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ye(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=g=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Uo(g).point)},u=(g,v)=>{const{drag:w,dragPropagation:E,onDragStart:b}=this.getProps();if(w&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vR(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yt(S=>{let R=this.getAxisMotionValue(S).get()||0;if(bn.test(R)){const{projection:V}=this.visualElement;if(V&&V.layout){const I=V.layout.layoutBox[S];I&&(R=Ut(I)*(parseFloat(R)/100))}}this.originPoint[S]=R}),b&&Be.postRender(()=>b(g,v)),Xd(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},c=(g,v)=>{const{dragPropagation:w,dragDirectionLock:E,onDirectionLock:b,onDrag:k}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:S}=v;if(E&&this.currentDirection===null){this.currentDirection=AN(S),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",v.point,S),this.updateAxis("y",v.point,S),this.visualElement.render(),k&&k(g,v)},f=(g,v)=>this.stop(g,v),h=()=>Yt(g=>{var v;return this.getAnimationState(g)==="paused"&&((v=this.getAxisMotionValue(g).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Dw(e,{onSessionStart:a,onStart:u,onMove:c,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,contextWindow:Hw(this.visualElement)})}stop(e,r){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:u}=this.getProps();u&&Be.postRender(()=>u(e,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,i){const{drag:a}=this.getProps();if(!i||!al(e,a,this.currentDirection))return;const u=this.getAxisMotionValue(e);let c=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(c=mN(c,this.constraints[e],this.elastic[e])),u.set(c)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:i}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,u=this.constraints;r&&Vs(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&a?this.constraints=gN(a.layoutBox,r):this.constraints=!1,this.elastic=wN(i),u!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&Yt(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=xN(a.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Vs(e))return!1;const i=e.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const u=EN(i,a.root,this.visualElement.getTransformPagePoint());let c=yN(a.layout.layoutBox,u);if(r){const f=r(SN(c));this.hasMutatedConstraints=!!f,f&&(c=Bw(f))}return c}startAnimation(e){const{drag:r,dragMomentum:i,dragElastic:a,dragTransition:u,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),h=this.constraints||{},m=Yt(g=>{if(!al(g,r,this.currentDirection))return;let v=h&&h[g]||{};c&&(v={min:0,max:0});const w=a?200:1e6,E=a?40:1e7,b={type:"inertia",velocity:i?e[g]:0,bounceStiffness:w,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...u,...v};return this.startAxisValueAnimation(g,b)});return Promise.all(m).then(f)}startAxisValueAnimation(e,r){const i=this.getAxisMotionValue(e);return Xd(this.visualElement,e),i.start(uh(e,i,0,r,this.visualElement,!1))}stopAnimation(){Yt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Yt(e=>{var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(e){var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(e){const r=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),a=i[r];return a||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Yt(r=>{const{drag:i}=this.getProps();if(!al(r,i,this.currentDirection))return;const{projection:a}=this.visualElement,u=this.getAxisMotionValue(r);if(a&&a.layout){const{min:c,max:f}=a.layout.layoutBox[r];u.set(e[r]-He(c,f,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Vs(r)||!i||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Yt(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const h=f.get();a[c]=vN({min:h,max:h},this.constraints[c])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Yt(c=>{if(!al(c,e,null))return;const f=this.getAxisMotionValue(c),{min:h,max:m}=this.constraints[c];f.set(He(h,m,a[c]))})}addListeners(){if(!this.visualElement.current)return;TN.set(this.visualElement,this);const e=this.visualElement.current,r=go(e,"pointerdown",h=>{const{drag:m,dragListener:g=!0}=this.getProps();m&&g&&this.start(h)}),i=()=>{const{dragConstraints:h}=this.getProps();Vs(h)&&h.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,u=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Be.read(i);const c=To(window,"resize",()=>this.scalePositionWithinConstraints()),f=a.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Yt(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=h[g].translate,v.set(v.get()+h[g].translate))}),this.visualElement.render())}));return()=>{c(),r(),u(),f&&f()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:a=!1,dragConstraints:u=!1,dragElastic:c=of,dragMomentum:f=!0}=e;return{...e,drag:r,dragDirectionLock:i,dragPropagation:a,dragConstraints:u,dragElastic:c,dragMomentum:f}}}function al(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function AN(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class PN extends _r{constructor(e){super(e),this.removeGroupControls=Bt,this.removeListeners=Bt,this.controls=new CN(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bt}unmount(){this.removeGroupControls(),this.removeListeners()}}const uv=t=>(e,r)=>{t&&Be.postRender(()=>t(e,r))};class RN extends _r{constructor(){super(...arguments),this.removePointerDownListener=Bt}onPointerDown(e){this.session=new Dw(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hw(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:i,onPanEnd:a}=this.node.getProps();return{onSessionStart:uv(e),onStart:uv(r),onMove:i,onEnd:(u,c)=>{delete this.session,a&&Be.postRender(()=>a(u,c))}}}mount(){this.removePointerDownListener=go(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const wl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function cv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const to={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ce.test(t))t=parseFloat(t);else return t;const r=cv(t,e.target.x),i=cv(t,e.target.y);return`${r}% ${i}%`}},_N={correct:(t,{treeScale:e,projectionDelta:r})=>{const i=t,a=Ar.parse(t);if(a.length>5)return i;const u=Ar.createTransformer(t),c=typeof a[0]!="number"?1:0,f=r.x.scale*e.x,h=r.y.scale*e.y;a[0+c]/=f,a[1+c]/=h;const m=He(f,h,.5);return typeof a[2+c]=="number"&&(a[2+c]/=m),typeof a[3+c]=="number"&&(a[3+c]/=m),u(a)}};class NN extends M.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:i,layoutId:a}=this.props,{projection:u}=e;XP(jN),u&&(r.group&&r.group.add(u),i&&i.register&&a&&i.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),wl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:i,drag:a,isPresent:u}=this.props,c=i.projection;return c&&(c.isPresent=u,a||e.layoutDependency!==r||r===void 0?c.willUpdate():this.safeToRemove(),e.isPresent!==u&&(u?c.promote():c.relegate()||Be.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ff.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:a}=e;a&&(a.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(a),i&&i.deregister&&i.deregister(a))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ww(t){const[e,r]=Ax(),i=M.useContext(_f);return y.jsx(NN,{...t,layoutGroup:i,switchLayoutGroup:M.useContext(Lx),isPresent:e,safeToRemove:r})}const jN={borderRadius:{...to,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:to,borderTopRightRadius:to,borderBottomLeftRadius:to,borderBottomRightRadius:to,boxShadow:_N};function ON(t,e,r){const i=wt(t)?t:ko(t);return i.start(uh("",i,e,r)),i.animation}function IN(t){return t instanceof SVGElement&&t.tagName!=="svg"}const LN=(t,e)=>t.depth-e.depth;class DN{constructor(){this.children=[],this.isDirty=!1}add(e){Jf(this.children,e),this.isDirty=!0}remove(e){Zf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(LN),this.isDirty=!1,this.children.forEach(e)}}function MN(t,e){const r=kn.now(),i=({timestamp:a})=>{const u=a-r;u>=e&&(Cr(i),t(u-e))};return Be.read(i,!0),()=>Cr(i)}const qw=["TopLeft","TopRight","BottomLeft","BottomRight"],FN=qw.length,dv=t=>typeof t=="string"?parseFloat(t):t,fv=t=>typeof t=="number"||ce.test(t);function VN(t,e,r,i,a,u){a?(t.opacity=He(0,r.opacity!==void 0?r.opacity:1,BN(i)),t.opacityExit=He(e.opacity!==void 0?e.opacity:1,0,UN(i))):u&&(t.opacity=He(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,i));for(let c=0;cie?1:r(si(t,e,i))}function pv(t,e){t.min=e.min,t.max=e.max}function Gt(t,e){pv(t.x,e.x),pv(t.y,e.y)}function mv(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function gv(t,e,r,i,a){return t-=e,t=Ol(t,1/r,i),a!==void 0&&(t=Ol(t,1/a,i)),t}function zN(t,e=0,r=1,i=.5,a,u=t,c=t){if(bn.test(e)&&(e=parseFloat(e),e=He(c.min,c.max,e/100)-c.min),typeof e!="number")return;let f=He(u.min,u.max,i);t===u&&(f-=e),t.min=gv(t.min,e,r,f,a),t.max=gv(t.max,e,r,f,a)}function yv(t,e,[r,i,a],u,c){zN(t,e[r],e[i],e[a],e.scale,u,c)}const $N=["x","scaleX","originX"],HN=["y","scaleY","originY"];function vv(t,e,r,i){yv(t.x,e,$N,r?r.x:void 0,i?i.x:void 0),yv(t.y,e,HN,r?r.y:void 0,i?i.y:void 0)}function xv(t){return t.translate===0&&t.scale===1}function Qw(t){return xv(t.x)&&xv(t.y)}function wv(t,e){return t.min===e.min&&t.max===e.max}function WN(t,e){return wv(t.x,e.x)&&wv(t.y,e.y)}function Sv(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Gw(t,e){return Sv(t.x,e.x)&&Sv(t.y,e.y)}function bv(t){return Ut(t.x)/Ut(t.y)}function kv(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class qN{constructor(){this.members=[]}add(e){Jf(this.members,e),e.scheduleRender()}remove(e){if(Zf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(a=>e===a);if(r===0)return!1;let i;for(let a=r;a>=0;a--){const u=this.members[a];if(u.isPresent!==!1){i=u;break}}return i?(this.promote(i),!0):!1}promote(e,r){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:a}=e.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:i}=e;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function KN(t,e,r){let i="";const a=t.x.translate/e.x,u=t.y.translate/e.y,c=(r==null?void 0:r.z)||0;if((a||u||c)&&(i=`translate3d(${a}px, ${u}px, ${c}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),r){const{transformPerspective:m,rotate:g,rotateX:v,rotateY:w,skewX:E,skewY:b}=r;m&&(i=`perspective(${m}px) ${i}`),g&&(i+=`rotate(${g}deg) `),v&&(i+=`rotateX(${v}deg) `),w&&(i+=`rotateY(${w}deg) `),E&&(i+=`skewX(${E}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=t.x.scale*e.x,h=t.y.scale*e.y;return(f!==1||h!==1)&&(i+=`scale(${f}, ${h})`),i||"none"}const Qr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},fo=typeof window<"u"&&window.MotionDebug!==void 0,md=["","X","Y","Z"],QN={visibility:"hidden"},Ev=1e3;let GN=0;function gd(t,e,r,i){const{latestValues:a}=e;a[t]&&(r[t]=a[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Yw(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const r=sw(e);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:a,layoutId:u}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",Be,!(a||u))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Yw(i)}function Xw({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:i,resetTransform:a}){return class{constructor(c={},f=e==null?void 0:e()){this.id=GN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,fo&&(Qr.totalNodes=Qr.resolvedTargetDeltas=Qr.recalculatedProjection=0),this.nodes.forEach(JN),this.nodes.forEach(rj),this.nodes.forEach(sj),this.nodes.forEach(ZN),fo&&window.MotionDebug.record(Qr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let h=0;hthis.root.updateBlockedByResize=!1;t(c,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=MN(w,250),wl.hasAnimatedSinceResize&&(wl.hasAnimatedSinceResize=!1,this.nodes.forEach(Cv))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&g&&(h||m)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:w,hasRelativeTargetChanged:E,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||g.getDefaultTransition()||uj,{onLayoutAnimationStart:S,onLayoutAnimationComplete:R}=g.getProps(),V=!this.targetLayout||!Gw(this.targetLayout,b)||E,I=!w&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||I||w&&(V||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,I);const O={...Qf(k,"layout"),onPlay:S,onComplete:R};(g.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else w||Cv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Cr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ij),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Yw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h{const B=O/1e3;Av(v.x,c.x,B),Av(v.y,c.y,B),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vo(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aj(this.relativeTarget,this.relativeTargetOrigin,w,B),I&&WN(this.relativeTarget,I)&&(this.isProjectionDirty=!1),I||(I=Ye()),Gt(I,this.relativeTarget)),k&&(this.animationValues=g,VN(g,m,this.latestValues,B,V,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Be.update(()=>{wl.hasAnimatedSinceResize=!0,this.currentAnimation=ON(0,Ev,{...c,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ev),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:h,layout:m,latestValues:g}=c;if(!(!f||!h||!m)){if(this!==c&&this.layout&&m&&Jw(this.options.animationType,this.layout.layoutBox,m.layoutBox)){h=this.target||Ye();const v=Ut(this.layout.layoutBox.x);h.x.min=c.target.x.min,h.x.max=h.x.min+v;const w=Ut(this.layout.layoutBox.y);h.y.min=c.target.y.min,h.y.max=h.y.min+w}Gt(f,h),$s(f,g),yo(this.projectionDeltaWithTransform,this.layoutCorrected,f,g)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new qN),this.sharedNodes.get(c).add(f);const m=f.options.initialPromotionConfig;f.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var c;const{layoutId:f}=this.options;return f?((c=this.getStack())===null||c===void 0?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:f}=this.options;return f?(c=this.getStack())===null||c===void 0?void 0:c.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:h}=c;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(f=!0),!f)return;const m={};h.z&&gd("z",c,m,this.animationValues);for(let g=0;g{var f;return(f=c.currentAnimation)===null||f===void 0?void 0:f.stop()}),this.root.nodes.forEach(Tv),this.root.sharedNodes.clear()}}}function YN(t){t.updateLayout()}function XN(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:a}=t.layout,{animationType:u}=t.options,c=r.source!==t.layout.source;u==="size"?Yt(v=>{const w=c?r.measuredBox[v]:r.layoutBox[v],E=Ut(w);w.min=i[v].min,w.max=w.min+E}):Jw(u,r.layoutBox,i)&&Yt(v=>{const w=c?r.measuredBox[v]:r.layoutBox[v],E=Ut(i[v]);w.max=w.min+E,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[v].max=t.relativeTarget[v].min+E)});const f=Us();yo(f,i,r.layoutBox);const h=Us();c?yo(h,t.applyTransform(a,!0),r.measuredBox):yo(h,i,r.layoutBox);const m=!Qw(f);let g=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:w,layout:E}=v;if(w&&E){const b=Ye();vo(b,r.layoutBox,w.layoutBox);const k=Ye();vo(k,i,E.layoutBox),Gw(b,k)||(g=!0),v.options.layoutRoot&&(t.relativeTarget=k,t.relativeTargetOrigin=b,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:r,delta:h,layoutDelta:f,hasLayoutChanged:m,hasRelativeTargetChanged:g})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function JN(t){fo&&Qr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ZN(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ej(t){t.clearSnapshot()}function Tv(t){t.clearMeasurements()}function tj(t){t.isLayoutDirty=!1}function nj(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Cv(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rj(t){t.resolveTargetDelta()}function sj(t){t.calcProjection()}function ij(t){t.resetSkewAndRotation()}function oj(t){t.removeLeadSnapshot()}function Av(t,e,r){t.translate=He(e.translate,0,r),t.scale=He(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function Pv(t,e,r,i){t.min=He(e.min,r.min,i),t.max=He(e.max,r.max,i)}function aj(t,e,r,i){Pv(t.x,e.x,r.x,i),Pv(t.y,e.y,r.y,i)}function lj(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const uj={duration:.45,ease:[.4,0,.1,1]},Rv=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),_v=Rv("applewebkit/")&&!Rv("chrome/")?Math.round:Bt;function Nv(t){t.min=_v(t.min),t.max=_v(t.max)}function cj(t){Nv(t.x),Nv(t.y)}function Jw(t,e,r){return t==="position"||t==="preserve-aspect"&&!hN(bv(e),bv(r),.2)}function dj(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const fj=Xw({attachResizeListener:(t,e)=>To(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),yd={current:void 0},Zw=Xw({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!yd.current){const t=new fj({});t.mount(window),t.setOptions({layoutScroll:!0}),yd.current=t}return yd.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),hj={pan:{Feature:RN},drag:{Feature:PN,ProjectionNode:Zw,MeasureLayout:Ww}};function jv(t,e,r){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",r==="Start");const a="onHover"+r,u=i[a];u&&Be.postRender(()=>u(e,Uo(e)))}class pj extends _r{mount(){const{current:e}=this.node;e&&(this.unmount=hR(e,r=>(jv(this.node,r,"Start"),i=>jv(this.node,i,"End"))))}unmount(){}}class mj extends _r{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Bo(To(this.node.current,"focus",()=>this.onFocus()),To(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ov(t,e,r){const{props:i}=t;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",r==="Start");const a="onTap"+(r==="End"?"":r),u=i[a];u&&Be.postRender(()=>u(e,Uo(e)))}class gj extends _r{mount(){const{current:e}=this.node;e&&(this.unmount=yR(e,r=>(Ov(this.node,r,"Start"),(i,{success:a})=>Ov(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const uf=new WeakMap,vd=new WeakMap,yj=t=>{const e=uf.get(t.target);e&&e(t)},vj=t=>{t.forEach(yj)};function xj({root:t,...e}){const r=t||document;vd.has(r)||vd.set(r,{});const i=vd.get(r),a=JSON.stringify(e);return i[a]||(i[a]=new IntersectionObserver(vj,{root:t,...e})),i[a]}function wj(t,e,r){const i=xj(e);return uf.set(t,r),i.observe(t),()=>{uf.delete(t),i.unobserve(t)}}const Sj={some:0,all:1};class bj extends _r{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:i,amount:a="some",once:u}=e,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof a=="number"?a:Sj[a]},f=h=>{const{isIntersecting:m}=h;if(this.isInView===m||(this.isInView=m,u&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:g,onViewportLeave:v}=this.node.getProps(),w=m?g:v;w&&w(h)};return wj(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(kj(e,r))&&this.startObserver()}unmount(){}}function kj({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const Ej={inView:{Feature:bj},tap:{Feature:gj},focus:{Feature:mj},hover:{Feature:pj}},Tj={layout:{ProjectionNode:Zw,MeasureLayout:Ww}},cf={current:null},eS={current:!1};function Cj(){if(eS.current=!0,!!Of)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>cf.current=t.matches;t.addListener(e),e()}else cf.current=!1}const Aj=[...Tw,vt,Ar],Pj=t=>Aj.find(Ew(t)),Iv=new WeakMap;function Rj(t,e,r){for(const i in e){const a=e[i],u=r[i];if(wt(a))t.addValue(i,a);else if(wt(u))t.addValue(i,ko(a,{owner:t}));else if(u!==a)if(t.hasValue(i)){const c=t.getValue(i);c.liveStyle===!0?c.jump(a):c.hasAnimated||c.set(a)}else{const c=t.getStaticValue(i);t.addValue(i,ko(c!==void 0?c:a,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const Lv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class _j{scrapeMotionValuesFromProps(e,r,i){return{}}constructor({parent:e,props:r,presenceContext:i,reducedMotionConfig:a,blockInitialAnimation:u,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=oh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=kn.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),eS.current||Cj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:cf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Iv.delete(this.current),this.projection&&this.projection.unmount(),Cr(this.notifyUpdate),Cr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const r=this.features[e];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(e,r){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=fs.has(e),a=r.on("change",f=>{this.latestValues[e]=f,this.props.onUpdate&&Be.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),u=r.on("renderRequest",this.scheduleRender);let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,e,r)),this.valueSubscriptions.set(e,()=>{a(),u(),c&&c(),r.owner&&r.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ii){const r=ii[e];if(!r)continue;const{isEnabled:i,Feature:a}=r;if(!this.features[e]&&a&&i(this.props)&&(this.features[e]=new a(this)),this.features[e]){const u=this.features[e];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ye()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;ir.variantChildren.delete(e)}addValue(e,r){const i=this.values.get(e);r!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,r),this.values.set(e,r),this.latestValues[e]=r.get())}removeValue(e){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&r!==void 0&&(i=ko(r===null?void 0:r,{owner:this}),this.addValue(e,i)),i}readValue(e,r){var i;let a=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,e,this.options);return a!=null&&(typeof a=="string"&&(bw(a)||hw(a))?a=parseFloat(a):!Pj(a)&&Ar.test(r)&&(a=xw(e,r)),this.setBaseTarget(e,wt(a)?a.get():a)),wt(a)?a.get():a}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:i}=this.props;let a;if(typeof i=="string"||typeof i=="object"){const c=Bf(this.props,i,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);c&&(a=c[e])}if(i&&a!==void 0)return a;const u=this.getBaseTargetFromProps(this.props,e);return u!==void 0&&!wt(u)?u:this.initialValues[e]!==void 0&&a===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new eh),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class tS extends _j{constructor(){super(...arguments),this.KeyframeResolver=Cw}sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:i}){delete r[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;wt(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function Nj(t){return window.getComputedStyle(t)}class jj extends tS{constructor(){super(...arguments),this.type="html",this.renderInstance=zx}readValueFromInstance(e,r){if(fs.has(r)){const i=ih(r);return i&&i.default||0}else{const i=Nj(e),a=(Vx(r)?i.getPropertyValue(r):i[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(e,{transformPagePoint:r}){return $w(e,r)}build(e,r,i){$f(e,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,r,i){return Kf(e,r,i)}}class Oj extends tS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ye}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(fs.has(r)){const i=ih(r);return i&&i.default||0}return r=$x.has(r)?r:Mf(r),e.getAttribute(r)}scrapeMotionValuesFromProps(e,r,i){return qx(e,r,i)}build(e,r,i){Hf(e,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,i,a){Hx(e,r,i,a)}mount(e){this.isSVGTag=qf(e.tagName),super.mount(e)}}const Ij=(t,e)=>Vf(t)?new Oj(e):new jj(e,{allowProjection:t!==M.Fragment}),Lj=oR({...sN,...Ej,...hj,...Tj},Ij),Et=SP(Lj),Dv=[{label:"Why Atlas",href:"#"},{label:"Services",href:"#"},{label:"How We Work",href:"#"},{label:"Insights",href:"#",active:!0}];function Dj(){const[t,e]=M.useState(!1),[r,i]=M.useState(!1);return M.useEffect(()=>{const a=()=>e(window.scrollY>40);return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[]),y.jsxs(y.Fragment,{children:[y.jsx("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 bg-background border-b border-border ${t?"py-2 shadow-sm":"py-4"}`,children:y.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex items-center justify-between",children:[y.jsxs("a",{href:"#",className:"flex items-center gap-2 group",children:[y.jsx(e0,{className:"w-8 h-8 text-primary",strokeWidth:2}),y.jsx("span",{className:"font-heading font-bold text-[22px] tracking-tight text-foreground",style:{letterSpacing:"-0.5px"},children:"ATLAS"})]}),y.jsx("div",{className:"hidden md:flex items-center gap-8",children:Dv.map(a=>y.jsx("a",{href:a.href,className:`text-sm font-body font-medium transition-colors ${a.active?"text-primary":"text-text-secondary hover:text-foreground"}`,children:a.label},a.label))}),y.jsx("div",{className:"hidden md:block",children:y.jsx("a",{href:"#cta",className:"inline-block bg-primary text-primary-foreground font-heading font-semibold text-sm px-5 py-2.5 transition-all hover:opacity-90",style:{clipPath:"polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px))"},children:"Contact Sales"})}),y.jsx("button",{className:"md:hidden p-2 text-foreground",onClick:()=>i(!r),"aria-label":"Toggle menu",children:r?y.jsx(n0,{className:"w-6 h-6"}):y.jsx(Ab,{className:"w-6 h-6"})})]})}),y.jsx(hP,{children:r&&y.jsxs(Et.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-background flex flex-col items-center justify-center gap-8",children:[Dv.map(a=>y.jsx("a",{href:a.href,onClick:()=>i(!1),className:`font-heading text-2xl font-semibold ${a.active?"text-primary":"text-foreground"}`,children:a.label},a.label)),y.jsx("a",{href:"#cta",onClick:()=>i(!1),className:"mt-4 bg-primary text-primary-foreground font-heading font-semibold px-8 py-3 rounded-md",children:"Contact Sales"})]})})]})}const Mv=[{id:"hero",label:"0.0"},{id:"takeaways",label:"0.1"},{id:"taxonomy",label:"1.0"},{id:"delivers",label:"2.0"},{id:"hype",label:"3.0"},{id:"adversarial",label:"4.0"},{id:"strategy",label:"5.0"},{id:"future",label:"6.0"},{id:"author",label:"7.0"}];function Mj(){const[t,e]=M.useState("hero");return M.useEffect(()=>{const r=new IntersectionObserver(i=>{i.forEach(a=>{a.isIntersecting&&e(a.target.id)})},{rootMargin:"-30% 0px -60% 0px"});return Mv.forEach(({id:i})=>{const a=document.getElementById(i);a&&r.observe(a)}),()=>r.disconnect()},[]),y.jsx("div",{className:"progress-ledger fixed right-6 top-1/2 -translate-y-1/2 z-30 hidden xl:flex flex-col items-end gap-1",children:Mv.map(({id:r,label:i})=>y.jsx("a",{href:`#${r}`,className:`font-mono text-[11px] px-2 py-1 rounded transition-all duration-200 ${t===r?"text-primary bg-primary-light font-medium":"text-text-tertiary hover:text-text-secondary"}`,children:i},r))})}function Fj(){return y.jsx("section",{id:"hero",className:"blueprint-grid pt-28 sm:pt-32 !pb-8",children:y.jsxs("div",{className:"max-w-article mx-auto px-4 sm:px-6 lg:px-8",children:[y.jsx("nav",{"aria-label":"Breadcrumb",className:"mb-8",children:y.jsxs("ol",{className:"flex items-center gap-1.5 font-body text-xs",children:[y.jsx("li",{children:y.jsx("a",{href:"#",className:"text-text-tertiary hover:text-text-secondary transition-colors",children:"Home"})}),y.jsx("li",{className:"text-muted-foreground",children:"/"}),y.jsx("li",{children:y.jsx("a",{href:"#",className:"text-text-tertiary hover:text-text-secondary transition-colors",children:"Insights"})}),y.jsx("li",{className:"text-muted-foreground",children:"/"}),y.jsx("li",{className:"text-primary font-medium",children:"AI in Cybersecurity"})]})}),y.jsx(Et.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,ease:[.22,1,.36,1]},className:"font-heading font-bold text-foreground leading-[1.1] tracking-tight mb-8",style:{fontSize:"clamp(2rem, 5vw, 3.5rem)"},children:"AI in Cybersecurity: Separating Vendor Hype from Enterprise Reality"}),y.jsxs(Et.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"inline-flex items-center gap-3 font-mono text-xs text-text-tertiary border border-border rounded-md px-4 py-2.5 bg-secondary mb-8",children:[y.jsx("span",{className:"text-text-secondary font-medium",children:"By Atlas Security Intelligence Team"}),y.jsx("span",{className:"text-border",children:"·"}),y.jsx("span",{children:"March 25, 2026"}),y.jsx("span",{className:"text-border",children:"·"}),y.jsx("span",{children:"15 min read"})]}),y.jsx(Et.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"font-body text-text-secondary text-lg leading-relaxed mb-8 max-w-[65ch]",children:"Every cybersecurity vendor now claims to have AI. But what actually works? What's just rebranded machine learning? And what's outright fiction? This article cuts through the noise—providing a framework for evaluating AI security claims, identifying genuine capabilities, and building a practical AI strategy that delivers measurable value."}),y.jsxs(Et.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,delay:.4},className:"flex items-center gap-4",children:[y.jsx("span",{className:"font-mono text-[11px] text-text-tertiary uppercase tracking-wider",children:"Share"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("a",{href:"#",className:"text-text-tertiary hover:text-primary transition-colors","aria-label":"Share on LinkedIn",children:y.jsx(kb,{className:"w-5 h-5"})}),y.jsx("a",{href:"#",className:"text-text-tertiary hover:text-primary transition-colors","aria-label":"Share on Twitter",children:y.jsx(Nb,{className:"w-5 h-5"})}),y.jsx("a",{href:"#",className:"text-text-tertiary hover:text-primary transition-colors","aria-label":"Share via Email",children:y.jsx(Tb,{className:"w-5 h-5"})})]})]})]})})}const Vj=[{bold:'Most "AI" is not artificial intelligence.',text:'The majority of vendors marketing "AI-powered" security are using traditional machine learning or basic automation. Understand the taxonomy before evaluating claims.'},{bold:"Generative AI is a productivity tool, not a security strategy.",text:"LLMs excel at summarization, investigation assistance, and report generation. They cannot replace detection, response, or decision-making in high-stakes environments."},{bold:"False positive reduction is where AI delivers today.",text:"Organizations that deployed proven AI models reduced alert volumes by 60-80%, allowing analysts to focus on genuine threats rather than noise."},{bold:"Adversarial AI is emerging faster than defensive AI.",text:"Attackers are already using AI to craft phishing, evade detection, and automate reconnaissance. The defensive gap is widening."},{bold:"The AI security stack requires human oversight.",text:"No autonomous AI system should operate without guardrails. Successful deployments use AI to augment human analysts—not replace them."}];function Bj(){return y.jsx("section",{id:"takeaways",className:"py-16",children:y.jsx("div",{className:"max-w-article mx-auto px-4 sm:px-6 lg:px-8",children:y.jsxs(Et.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5},className:"bg-secondary rounded-2xl p-6 sm:p-8 border-l-4 border-l-primary",children:[y.jsxs("h2",{className:"font-heading font-semibold text-xl text-foreground mb-5 flex items-center gap-2",children:[y.jsx("span",{className:"font-mono text-xs text-primary bg-primary-light px-2 py-0.5 rounded",children:"BRIEF"}),"Key Takeaways"]}),y.jsx("ul",{className:"space-y-4",children:Vj.map((t,e)=>y.jsxs(Et.li,{initial:{opacity:0,x:-10},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.4,delay:e*.08},className:"flex gap-3 text-text-secondary font-body text-[15px] leading-relaxed",children:[y.jsx("span",{className:"mt-1.5 w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0"}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground font-medium",children:t.bold})," ",t.text]})]},e))})]})})})}function dr({id:t,number:e,title:r,children:i}){return y.jsxs(Et.section,{id:t,initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5},className:"mb-16",children:[r&&y.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e&&y.jsx("span",{className:"font-mono text-xs text-primary bg-primary-light px-2.5 py-1 rounded font-medium",children:e}),y.jsx("h2",{className:"font-heading font-semibold text-2xl sm:text-[28px] text-foreground tracking-tight",children:r})]}),y.jsx("div",{className:"font-body text-text-secondary text-[16px] sm:text-[17px] leading-[1.75] space-y-5",children:i})]})}function fr({number:t,title:e,children:r}){return y.jsxs("div",{className:"mb-10",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[t&&y.jsx("span",{className:"font-mono text-[11px] text-text-tertiary",children:t}),y.jsx("h3",{className:"font-heading font-semibold text-xl text-foreground",children:e})]}),y.jsx("div",{className:"space-y-4 text-text-secondary text-[16px] leading-[1.75]",children:r})]})}function Fv({children:t}){return y.jsx(Et.blockquote,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5},className:"relative my-10 mx-0 sm:mx-4 group",children:y.jsxs("div",{className:"relative overflow-hidden bg-primary-light border border-primary/10 rounded-lg px-6 py-5 sm:px-8 sm:py-6",children:[y.jsx("span",{className:"absolute top-2 left-2 text-primary/30 font-mono text-lg leading-none",children:"┌"}),y.jsx("span",{className:"absolute top-2 right-2 text-primary/30 font-mono text-lg leading-none",children:"┐"}),y.jsx("span",{className:"absolute bottom-2 left-2 text-primary/30 font-mono text-lg leading-none",children:"└"}),y.jsx("span",{className:"absolute bottom-2 right-2 text-primary/30 font-mono text-lg leading-none",children:"┘"}),y.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-primary/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700 group-hover:translate-x-full transform -translate-x-full",style:{transition:"transform 0.8s ease, opacity 0.3s ease"}}),y.jsx("p",{className:"font-mono text-sm sm:text-base text-primary font-medium leading-relaxed relative z-10",children:t})]})})}function xd({items:t}){return y.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 my-8",children:t.map((e,r)=>y.jsxs("div",{className:"text-center p-5 rounded-xl border border-border bg-secondary",children:[y.jsx("div",{className:"font-mono text-2xl sm:text-3xl font-medium text-primary mb-1",children:e.value}),y.jsx("div",{className:"font-body text-xs text-text-tertiary leading-snug",children:e.label})]},r))})}function no({level:t,title:e,whatItIs:r,vendorsCall:i,works:a,fails:u}){return y.jsxs("div",{className:"my-6 p-5 rounded-xl border border-border bg-background hover:border-primary/20 transition-colors",children:[y.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[y.jsxs("span",{className:"font-mono text-xs text-primary bg-primary-light px-2 py-1 rounded font-medium",children:["L",t]}),y.jsx("h4",{className:"font-heading font-semibold text-foreground text-lg",children:e})]}),y.jsxs("div",{className:"space-y-2 text-sm font-body text-text-secondary",children:[y.jsxs("p",{children:[y.jsx("span",{className:"font-medium text-foreground",children:"What it is:"})," ",r]}),y.jsxs("p",{children:[y.jsx("span",{className:"font-medium text-foreground",children:"What vendors call it:"})," ",i]}),y.jsxs("p",{children:[y.jsx("span",{className:"text-primary font-medium",children:"Where it works:"})," ",a]}),y.jsxs("p",{children:[y.jsx("span",{className:"text-destructive font-medium",children:"Where it fails:"})," ",u]})]})]})}function Uj(){return y.jsx("article",{className:"py-4",children:y.jsxs("div",{className:"max-w-article mx-auto px-4 sm:px-6 lg:px-8",children:[y.jsx("div",{className:"border-t border-border mb-16"}),y.jsxs(dr,{id:"intro",children:[y.jsx("p",{children:"In 2025, every cybersecurity vendor claims to have AI. It's in the product names. It's in the marketing collateral. It's in the earnings calls. And for security leaders trying to make rational investment decisions, it's become nearly impossible to separate genuine capability from marketing hype."}),y.jsx("p",{children:'Is the vendor using large language models or simple keyword matching? Are they applying machine learning to detection or just adding a chatbot interface to their SIEM? Is their "AI" actually improving security outcomes, or is it just a pricing multiplier?'}),y.jsx("p",{children:"This article is a framework for answering those questions. It's not a product review. It's a practical guide to understanding what AI in cybersecurity actually means, where it delivers value today, where it's overhyped, and how to build a strategy that works for your enterprise."})]}),y.jsxs(dr,{id:"taxonomy",number:"01",title:"The Taxonomy of AI in Security",children:[y.jsx("p",{children:'Before evaluating claims, you need a vocabulary for what "AI" actually means. Most vendors lump fundamentally different technologies under the same umbrella.'}),y.jsx(no,{level:1,title:"Automation",whatItIs:"Rule-based systems that execute predefined actions based on triggers.",vendorsCall:'Often mislabeled as "AI-powered automation"',works:"Playbook execution, basic alert triage",fails:"Adapting to novel threats"}),y.jsx(no,{level:2,title:"Traditional Machine Learning",whatItIs:"Statistical models trained on historical data to identify patterns and make predictions.",vendorsCall:'"Machine learning" (legitimate) or sometimes "AI" (stretched)',works:"Anomaly detection, classification, behavioral baselining",fails:"Adapting to rapidly evolving threats without retraining"}),y.jsx(no,{level:3,title:"Deep Learning",whatItIs:"Neural networks with multiple layers that can identify complex patterns without explicit feature engineering.",vendorsCall:'"Advanced AI," "deep learning" (legitimate)',works:"Image analysis, natural language processing, sophisticated malware detection",fails:"Explainability, requires large training datasets"}),y.jsx(no,{level:4,title:"Generative AI / Large Language Models",whatItIs:"Models trained on vast text corpora that can generate human-like text, summarize, and reason.",vendorsCall:'"Generative AI," "LLM-powered" (legitimate if accurate)',works:"Investigation summarization, report generation, natural language interfaces",fails:"Factual accuracy, security decision-making, hallucinations"}),y.jsx(no,{level:5,title:"Autonomous AI",whatItIs:"Systems that can act independently, making decisions and taking actions without human intervention.",vendorsCall:'"Autonomous security," "AI-driven response" (often aspirational)',works:"Narrow, well-defined, low-risk contexts",fails:"High-stakes decisions, novel situations, adversarial environments"}),y.jsx(Fv,{children:`"If a vendor can't tell you what type of AI they're using—and what its limitations are—assume the claim is marketing, not engineering."`})]}),y.jsxs(dr,{id:"delivers",number:"02",title:"Where AI Actually Delivers (Today)",children:[y.jsx("p",{children:"After evaluating hundreds of deployments across financial services, healthcare, and technology enterprises, we've identified four areas where AI consistently delivers measurable value."}),y.jsxs(fr,{number:"2.1",title:"False Positive Reduction",children:[y.jsx("p",{children:"The most significant—and least glamorous—impact of AI in security is false positive reduction."}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Problem:"})," A typical SOC generates thousands of alerts per day. The majority are false positives. Analysts spend 60-70% of their time triaging noise rather than investigating genuine threats."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"How AI Helps:"})," Machine learning models trained on historical data can accurately classify alerts by confidence level, automatically suppressing known false positives and prioritizing high-confidence detections."]}),y.jsx(xd,{items:[{value:"60-80%",label:"Reduction in alert volume"},{value:"40-50%",label:"Increase in analyst productivity"},{value:"30-50%",label:"Reduction in MTTD"}]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"What It's Not:"})," This isn't magic. It requires quality training data, ongoing model tuning, and continuous validation. Models degrade over time and need refreshing."]})]}),y.jsxs(fr,{number:"2.2",title:"Behavioral Analytics",children:[y.jsx("p",{children:"Traditional detection relies on signatures and rules. Behavioral analytics uses machine learning to establish baselines of normal behavior and detect deviations."}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Problem:"}),' Attackers increasingly use legitimate tools and credentials. Signature-based detection misses "living off the land" techniques.']}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"How AI Helps:"})," Models learn what normal looks like for users, devices, and applications. They detect anomalies—unusual login locations, atypical data access, abnormal process execution—that may indicate compromise."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"What It's Not:"})," Behavioral models generate anomalies, not certainty. Each anomaly requires investigation. Successful deployments integrate anomaly detection with investigation workflows."]})]}),y.jsxs(fr,{number:"2.3",title:"Investigation Assistance",children:[y.jsx("p",{children:"Generative AI excels at summarization and natural language interaction—perfect for accelerating investigation workflows."}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Problem:"})," Investigating a security alert requires gathering data from multiple sources: endpoint logs, network flows, identity systems, threat intelligence. This takes time, especially for junior analysts."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"How AI Helps:"}),' LLMs can ingest disparate data sources and generate coherent summaries. Analysts can ask natural language questions: "Show me all lateral movement from this endpoint in the past 24 hours." AI translates to queries and returns structured results.']}),y.jsx(xd,{items:[{value:"30-50%",label:"Reduction in investigation time"},{value:"Faster",label:"Junior analyst onboarding"},{value:"More",label:"Consistent documentation"}]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"What It's Not:"})," LLMs hallucinate. They can produce confident-sounding answers that are factually incorrect. Outputs must be validated. These tools assist analysts—they don't replace them."]})]}),y.jsxs(fr,{number:"2.4",title:"Phishing Detection",children:[y.jsx("p",{children:"Email remains the primary initial access vector. AI has proven exceptionally effective at identifying sophisticated phishing."}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Problem:"})," Modern phishing bypasses traditional filters. Attackers use legitimate infrastructure, personalized content, and social engineering. Phishing kits now include AI-generated text."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"How AI Helps:"})," Machine learning models analyze hundreds of email attributes—sender reputation, content patterns, linguistic analysis, URL structures, attachment characteristics—to identify malicious messages with high accuracy."]}),y.jsx(xd,{items:[{value:"90%+",label:"Detection rate for sophisticated phishing"},{value:"Lower",label:"User-reported false positives"},{value:"Faster",label:"Account containment"}]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"What It's Not:"})," No detection is perfect. AI models miss novel techniques. Human-in-the-loop verification remains essential for high-risk messages."]})]})]}),y.jsxs(dr,{id:"hype",number:"03",title:"The Hype Cycle: What's Overpromised",children:[y.jsx("p",{children:"For every area where AI delivers, there are three where marketing outruns reality."}),y.jsxs(fr,{number:"3.1",title:"Autonomous Response",children:[y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Promise:"})," AI that detects and responds to threats without human intervention. Close the loop. Stop attacks instantly."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Reality:"})," Autonomous response in high-stakes environments remains aspirational. The consequences of a false positive containment are catastrophic—taking down a critical system or blocking a legitimate user. Most enterprises restrict autonomous response to low-risk, well-defined scenarios."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-primary",children:"What Works:"})," Human-in-the-loop response with AI-recommended actions. Analysts review and approve AI-generated response plans before execution."]})]}),y.jsxs(fr,{number:"3.2",title:"Predictive Threat Intelligence",children:[y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Promise:"})," AI that predicts future attacks before they happen. Know what adversaries will do next."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Reality:"})," Prediction requires data that doesn't exist. AI models can forecast based on historical patterns—predicting likely attack vectors or targeting trends—but cannot predict specific attacks with any reliability."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-primary",children:"What Works:"})," AI-powered trend analysis that helps prioritize defenses based on likely adversary behavior. Not prediction—probabilistic forecasting."]})]}),y.jsxs(fr,{number:"3.3",title:"Full-Spectrum Threat Detection",children:[y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Promise:"})," AI that detects every threat, every time. Zero false positives. Perfect security."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Reality:"})," No detection technology is perfect. AI models have blind spots. Adversaries are actively developing techniques to evade detection. And AI systems generate false positives—they're just different false positives than traditional tools."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-primary",children:"What Works:"})," Layered detection combining AI, traditional signatures, behavioral analytics, and human threat hunting. Defense in depth applies to AI too."]})]}),y.jsxs(fr,{number:"3.4",title:"AI That Replaces Security Teams",children:[y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Promise:"})," Do more with less. AI eliminates the need for human analysts. Security on autopilot."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"The Reality:"})," AI augments analysts; it doesn't replace them. The organizations achieving the best outcomes use AI to amplify human capabilities—not eliminate them. Analysts who leverage AI are more productive, but they remain essential for judgment, context, and high-stakes decisions."]})]}),y.jsx(Fv,{children:`"If a vendor promises to replace your security team with AI, run. They don't understand security—or AI."`})]}),y.jsxs(dr,{id:"adversarial",number:"04",title:"The Adversarial AI Gap",children:[y.jsx("p",{children:"While defenders debate the merits of AI, adversaries are already deploying it."}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"AI-Generated Phishing:"})," Attackers use LLMs to craft personalized, grammatically perfect phishing messages at scale. These bypass traditional language-based detection."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"Automated Reconnaissance:"})," AI tools analyze target organizations, identifying key personnel, organizational structures, and potential vulnerabilities faster than human attackers."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"Evasion Techniques:"})," Adversaries are developing AI that generates malware variants designed to evade detection—iterating until a variant bypasses security controls."]}),y.jsxs("p",{children:[y.jsx("strong",{className:"text-foreground",children:"Deepfake Social Engineering:"})," Voice and video deepfakes are being used in sophisticated social engineering attacks against executives and finance teams."]}),y.jsxs("p",{className:"p-4 rounded-lg bg-destructive/5 border border-destructive/10 text-foreground font-medium text-sm",children:[y.jsx("strong",{children:"The Gap:"})," Defensive AI is reactive, trained on historical attack patterns. Adversarial AI is proactive, generating novel techniques designed to evade existing defenses. The gap is widening."]})]}),y.jsxs(dr,{id:"strategy",number:"05",title:"Building a Practical AI Strategy",children:[y.jsx("p",{children:"How should security leaders approach AI? Not as a silver bullet, but as a toolset to be deployed thoughtfully."}),y.jsxs(ro,{number:"01",title:"Audit Your Current Capabilities",children:[y.jsx("p",{children:"Before buying new AI tools, understand what you already have:"}),y.jsxs("ul",{className:"list-none space-y-2 my-3 pl-0",children:[y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," What machine learning capabilities exist in your current tools?"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," Are you using them? Are they configured properly?"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," What data is available for training models?"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," What gaps exist in your detection coverage?"]})]})]}),y.jsxs(ro,{number:"02",title:"Define Use Cases, Not Features",children:[y.jsx("p",{children:`Don't buy "AI." Buy solutions to specific problems:`}),y.jsxs("ul",{className:"list-none space-y-2 my-3 pl-0",children:[y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"}),' "We need to reduce alert volume by 50% to improve analyst productivity."']}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"}),' "We need to detect phishing that evades our existing filters."']}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"}),' "We need to accelerate investigation workflows for our junior analysts."']})]}),y.jsx("p",{children:"Define the problem, measure the current state, and evaluate vendors on their ability to improve the metric."})]}),y.jsxs(ro,{number:"03",title:"Evaluate Rigorously",children:[y.jsx("p",{children:"When evaluating AI security vendors:"}),y.jsxs("ul",{className:"list-none space-y-2 my-3 pl-0",children:[y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," ",y.jsx("strong",{className:"text-foreground",children:"Ask about the model."})," What type of AI? How was it trained? What data? How often is it retrained?"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," ",y.jsx("strong",{className:"text-foreground",children:"Ask about testing."})," How is model performance measured? What are the false positive and false negative rates?"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," ",y.jsx("strong",{className:"text-foreground",children:"Ask about explainability."})," Can the model explain its decisions? Or is it a black box?"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," ",y.jsx("strong",{className:"text-foreground",children:"Ask about adversarial resilience."})," How does the model perform against adversarial AI?"]})]})]}),y.jsxs(ro,{number:"04",title:"Pilot Before Committing",children:[y.jsx("p",{children:"Deploy new AI capabilities in controlled environments before scaling:"}),y.jsxs("ul",{className:"list-none space-y-2 my-3 pl-0",children:[y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," Run parallel detection for 30-90 days"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," Measure performance against existing tools"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," Validate false positive rates in your environment"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," Train analysts on new workflows"]}),y.jsxs("li",{className:"flex gap-2",children:[y.jsx("span",{className:"text-primary mt-0.5",children:"→"})," Establish human oversight mechanisms"]})]})]}),y.jsxs(ro,{number:"05",title:"Build for Human-AI Collaboration",children:[y.jsx("p",{children:"The most effective AI deployments don't replace humans—they enable them:"}),y.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 my-4",children:[y.jsxs("div",{className:"p-4 rounded-lg border border-border bg-primary-light",children:[y.jsx("span",{className:"font-mono text-xs text-primary font-medium",children:"AI HANDLES"}),y.jsx("p",{className:"mt-1 text-sm text-foreground",children:"Volume: triage, filtering, prioritization. Documentation: summarization, reporting."})]}),y.jsxs("div",{className:"p-4 rounded-lg border border-border bg-secondary",children:[y.jsx("span",{className:"font-mono text-xs text-text-tertiary font-medium",children:"HUMANS HANDLE"}),y.jsx("p",{className:"mt-1 text-sm text-foreground",children:"Complexity: investigation, judgment, response. Decisions: high-stakes actions."})]})]})]})]}),y.jsxs(dr,{id:"future",number:"06",title:"The Future of AI in Security",children:[y.jsx("p",{children:"Where is AI in security heading over the next three years?"}),y.jsxs("div",{className:"space-y-4 my-6",children:[y.jsx(ll,{year:"2026–2027",title:"Agentic AI",children:"AI systems that can take actions within defined boundaries, with human approval for high-risk decisions. Not fully autonomous—but capable of executing routine response actions with supervision."}),y.jsx(ll,{year:"2027–2028",title:"AI-Native Security Operations",children:"Security platforms built from the ground up for AI—with data architecture, workflows, and interfaces designed for human-AI collaboration rather than bolt-on AI features."}),y.jsx(ll,{year:"2028+",title:"Continuous AI Model Evolution",children:"Models that continuously adapt to emerging threats, trained on real-time data with automated validation. Moving from periodic retraining to continuous learning."}),y.jsx(ll,{year:"Ongoing",title:"Defensive AI vs. Adversarial AI",children:"The arms race will intensify. Defenders will need AI that can adapt as fast as adversaries—or faster."})]})]}),y.jsxs(dr,{id:"conclusion",title:"Conclusion: Beyond the Hype",children:[y.jsx("p",{children:"AI in cybersecurity is real. It's delivering value. But it's also drowning in hype that makes rational evaluation nearly impossible."}),y.jsx("p",{children:"The organizations winning with AI are those that approach it with skepticism and discipline. They understand what AI is—and what it isn't. They invest in areas with proven ROI: false positive reduction, behavioral analytics, investigation assistance. They build for human-AI collaboration, not replacement. And they never stop asking the hard questions."}),y.jsx("p",{children:"The AI hype cycle will eventually settle. The vendors with genuine capability will survive. The rest will rebrand to the next buzzword. But for security leaders, the task remains the same: separate signal from noise, invest where value is proven, and build defenses that work in the real world."})]})]})})}function ro({number:t,title:e,children:r}){return y.jsxs("div",{className:"my-8 pl-5 border-l-2 border-primary/20",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[y.jsxs("span",{className:"font-mono text-xs text-primary font-medium",children:["STEP ",t]}),y.jsx("h4",{className:"font-heading font-semibold text-lg text-foreground",children:e})]}),y.jsx("div",{className:"space-y-3 text-text-secondary",children:r})]})}function ll({year:t,title:e,children:r}){return y.jsxs("div",{className:"flex gap-4 p-4 rounded-xl border border-border hover:border-primary/20 transition-colors",children:[y.jsx("div",{className:"flex-shrink-0",children:y.jsx("span",{className:"font-mono text-xs text-primary bg-primary-light px-2 py-1 rounded font-medium whitespace-nowrap",children:t})}),y.jsxs("div",{children:[y.jsx("h4",{className:"font-heading font-semibold text-foreground mb-1",children:e}),y.jsx("p",{className:"text-sm text-text-secondary",children:r})]})]})}function zj(){return y.jsx("section",{id:"author",className:"py-16",children:y.jsx("div",{className:"max-w-article mx-auto px-4 sm:px-6 lg:px-8",children:y.jsx(Et.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"bg-secondary rounded-2xl p-6 sm:p-8",children:y.jsxs("div",{className:"flex flex-col sm:flex-row items-center sm:items-start gap-4 sm:gap-5",children:[y.jsx("div",{className:"w-14 h-14 rounded-full bg-primary-light flex items-center justify-center flex-shrink-0",children:y.jsx(t0,{className:"w-6 h-6 text-primary"})}),y.jsxs("div",{className:"text-center sm:text-left",children:[y.jsx("h3",{className:"font-heading font-semibold text-lg text-foreground",children:"Atlas Security Intelligence Team"}),y.jsx("p",{className:"font-body text-sm text-text-tertiary mt-0.5",children:"AI & Security Research"}),y.jsx("p",{className:"font-body text-sm text-text-secondary mt-2 max-w-[60ch]",children:"The Atlas Security Intelligence Team has evaluated AI security technologies across hundreds of enterprise deployments. They've helped organizations separate genuine capability from marketing hype, building practical AI strategies that deliver measurable value."})]})]})})})})}const $j=[{title:"The Ransomware Playbook: How Enterprise Defenders Are Winning",description:"Strategies, architectures, and operational practices that separate the victims from the victors."},{title:"Nation-State Actors Are Targeting Your Supply Chain",description:"How leading enterprises defend against SolarWinds-style attacks with SBOM, vendor monitoring, and build pipeline security."},{title:"The SOC of the Future: AI-Augmented Operations",description:"How leading security operations centers are integrating AI to accelerate detection and response."}];function Hj(){return y.jsx("section",{className:"py-16",children:y.jsxs("div",{className:"max-w-article mx-auto px-4 sm:px-6 lg:px-8",children:[y.jsx("h2",{className:"font-heading font-semibold text-2xl text-foreground mb-8",children:"Related Insights"}),y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:$j.map((t,e)=>y.jsxs(Et.a,{href:"#",initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:e*.1},className:"group block border border-border rounded-2xl p-6 bg-background hover:border-text-tertiary transition-colors",children:[y.jsx("h3",{className:"font-heading font-semibold text-foreground text-[15px] leading-snug mb-3 group-hover:text-primary transition-colors",children:t.title}),y.jsx("p",{className:"font-body text-sm text-text-secondary leading-relaxed mb-4",children:t.description}),y.jsxs("span",{className:"inline-flex items-center gap-1.5 font-body text-sm font-medium text-primary group-hover:gap-2.5 transition-all",children:["Read more ",y.jsx(Sb,{className:"w-3.5 h-3.5"})]})]},e))})]})})}function Wj(){const[t,e]=M.useState(""),[r,i]=M.useState(!1),a=u=>{u.preventDefault(),t&&i(!0)};return y.jsx("section",{className:"py-16",children:y.jsx("div",{className:"max-w-article mx-auto px-4 sm:px-6 lg:px-8",children:y.jsxs(Et.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"bg-secondary rounded-[20px] py-12 px-6 sm:px-12 text-center",children:[y.jsx("h2",{className:"font-heading font-semibold text-2xl text-foreground mb-2",children:"Get insights delivered to your inbox."}),y.jsx("p",{className:"font-body text-base text-text-secondary mb-8 max-w-md mx-auto",children:"Subscribe to the Atlas Security Intelligence Brief. Weekly analysis, threat intelligence, and actionable strategies."}),r?y.jsx("p",{className:"font-body text-primary font-medium",children:"Thanks for subscribing!"}):y.jsxs("form",{onSubmit:a,className:"flex flex-col sm:flex-row items-center justify-center gap-3 max-w-md mx-auto",children:[y.jsx("input",{type:"email",value:t,onChange:u=>e(u.target.value),placeholder:"work@email.com",required:!0,className:"w-full sm:w-[280px] border border-border rounded-lg px-4 py-3 font-body text-sm bg-background text-foreground placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary"}),y.jsx("button",{type:"submit",className:"w-full sm:w-auto bg-primary text-primary-foreground font-heading font-semibold text-sm px-6 py-3 rounded-lg hover:opacity-90 transition-opacity",children:"Subscribe"})]}),y.jsx("p",{className:"font-body text-xs text-text-tertiary mt-4",children:"No spam. Unsubscribe anytime."})]})})})}function qj(){return y.jsx("section",{id:"cta",className:"border-t border-border py-20 sm:py-24",children:y.jsxs("div",{className:"max-w-article mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[y.jsx(Et.h2,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"font-heading font-semibold text-[28px] text-foreground mb-4",children:"Ready to cut through the AI hype?"}),y.jsx(Et.p,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},className:"font-body text-lg text-text-secondary max-w-[560px] mx-auto mb-8",children:"Let's discuss how Atlas can help your organization evaluate AI security technologies, build practical use cases, and deploy capabilities that deliver measurable value—without the vendor hype."}),y.jsx(Et.a,{href:"#",initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:.2},className:"inline-block bg-primary text-primary-foreground font-heading font-semibold px-8 py-3.5 rounded-md hover:opacity-90 transition-opacity",children:"Start the Conversation →"})]})})}const Kj=[{title:"Services",links:["Security Operations","Cloud Security","Compliance","Incident Response","AI Strategy"]},{title:"Company",links:["About","Leadership","Careers","Press"]},{title:"Resources",links:["Insights","Case Studies","Webinars","Documentation"]},{title:"Trust",links:["SOC 2 Type II","ISO 27001","Privacy Policy","Terms of Service"]}];function Qj(){return y.jsxs("footer",{className:"relative border-t border-border bg-background overflow-hidden",children:[y.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none select-none","aria-hidden":"true",children:y.jsx("span",{className:"font-heading font-bold text-[180px] sm:text-[260px] text-foreground/[0.02] tracking-tighter whitespace-nowrap",children:"ATLAS"})}),y.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:[y.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-8 md:gap-6",children:[y.jsxs("div",{className:"col-span-2 md:col-span-1",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[y.jsx(e0,{className:"w-6 h-6 text-primary"}),y.jsx("span",{className:"font-heading font-bold text-lg text-foreground tracking-tight",style:{letterSpacing:"-0.5px"},children:"ATLAS"})]}),y.jsx("p",{className:"font-body text-sm text-text-tertiary leading-relaxed max-w-[200px]",children:"World-premier enterprise security & IT partner."})]}),Kj.map(t=>y.jsxs("div",{className:"md:border-l md:border-border md:pl-6",children:[y.jsx("h4",{className:"font-heading font-semibold text-sm text-foreground mb-3",children:t.title}),y.jsx("ul",{className:"space-y-2",children:t.links.map(e=>y.jsx("li",{children:y.jsx("a",{href:"#",className:"font-body text-sm text-text-tertiary hover:text-text-secondary transition-colors",children:e})},e))})]},t.title))]}),y.jsxs("div",{className:"mt-12 pt-6 border-t border-border flex flex-col sm:flex-row items-center justify-between gap-4",children:[y.jsx("p",{className:"font-body text-xs text-text-tertiary",children:"© 2026 Atlas Security. All rights reserved."}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(t0,{className:"w-3.5 h-3.5 text-primary"}),y.jsx("span",{className:"font-mono text-[11px] text-text-tertiary",children:"Systems Operational"}),y.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"})]})]}),y.jsx("div",{className:"mt-4 text-center",children:y.jsx("span",{className:"font-mono text-[10px] text-text-tertiary/50",children:"SHA-256: 7e8a3f2b9c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f"})})]})]})}function Gj(){return y.jsxs("div",{className:"min-h-screen bg-background",children:[y.jsx(Dj,{}),y.jsx(Mj,{}),y.jsxs("main",{children:[y.jsx(Fj,{}),y.jsx(Bj,{}),y.jsx(Uj,{}),y.jsx(zj,{}),y.jsx(Hj,{}),y.jsx(Wj,{}),y.jsx(qj,{})]}),y.jsx(Qj,{})]})}const Yj=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:e,authError:r,navigateToLogin:i}=aP();if(e||t)return y.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:y.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(r){if(r.type==="user_not_registered")return y.jsx(lP,{});if(r.type==="auth_required")return i(),null}return y.jsxs(KE,{children:[y.jsx(Dd,{path:"/",element:y.jsx(Gj,{})}),y.jsx(Dd,{path:"*",element:y.jsx(iP,{})})]})};function Xj(){return y.jsx(oP,{children:y.jsxs(Yk,{client:uE,children:[y.jsx(YE,{children:y.jsx(Yj,{})}),y.jsx(Ek,{})]})})}ub.createRoot(document.getElementById("root")).render(y.jsx(Xj,{}));